{ "info": { "author": "Chuancong Gao", "author_email": "chuancong@gmail.com", "bugtrack_url": null, "classifiers": [ "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3" ], "description": "[![PyPI version](https://img.shields.io/pypi/v/RegexOrder.svg)](https://pypi.python.org/pypi/RegexOrder/)\n[![PyPI pyversions](https://img.shields.io/pypi/pyversions/RegexOrder.svg)](https://pypi.python.org/pypi/RegexOrder/)\n[![PyPI license](https://img.shields.io/pypi/l/RegexOrder.svg)](https://pypi.python.org/pypi/RegexOrder/)\n\nSearch the regex that fits all querying strings.\n\n- Dozens of pre-written regexes are indexed and organized as a [partial order](https://en.wikipedia.org/wiki/Partially_ordered_set), available in `regexorder/templates.json`.\n\n- The regex of all the querying strings' least upper bound in the partial order is returned.\n\n- `templates.svg` plots the partial order.\n\n![Templates](https://raw.githubusercontent.com/chuanconggao/RegexOrder/master/templates.svg?sanitize=true)\n\nThe core part is the pre-written regexes and their respective structure. Currently they only cover the most common cases.\n\n- Any idea or contribution is highly welcome.\n\n## Reference\n\nThis library is part of the implementation for our research paper to be submitted.\n\n## Installation\n\nThis package is available on PyPI. Just use `pip3 install -U RegexOrder` to install it.\n\nOur regexes utilize some advanced Unicode features, that are not available in standard `re` library yet. Thus, the more advanced [`regex`](https://pypi.org/project/regex/) library must be used to match our regexes.\n\n## Examples\n\n``` python\nfrom regexorder import RegexOrder\n\nr = RegexOrder()\n\nt = r.match(\"123\")\nt.name\n# 'pos_int'\nt.regex\n# '\\\\+?\\\\d+'\n\nt = r.matchall([\"apple\", \"banana\", \"cheese cake\"])\nt.name\n# 'lower_words'\nt.regex\n# '\\\\p{Ll}+(\\\\s+\\\\p{Ll}+)*'\n```", "description_content_type": "text/markdown", "docs_url": null, "download_url": "https://github.com/chuanconggao/RegexOrder/tarball/0.2", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/chuanconggao/RegexOrder", "keywords": "regex,string-matchingpartial-order", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "RegexOrder", "package_url": "https://pypi.org/project/RegexOrder/", "platform": "", "project_url": "https://pypi.org/project/RegexOrder/", "project_urls": { "Download": "https://github.com/chuanconggao/RegexOrder/tarball/0.2", "Homepage": "https://github.com/chuanconggao/RegexOrder" }, "release_url": "https://pypi.org/project/RegexOrder/0.2/", "requires_dist": null, "requires_python": ">= 3", "summary": "Search the regex that fits all querying strings.", "version": "0.2" }, "last_serial": 3879590, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "bdab7b097893b27066b2924515fdeb6b", "sha256": "dcedd8464b13bdc6741176add90975342fceba333ee74d8e4b3ee6ec1ca08f94" }, "downloads": -1, "filename": "RegexOrder-0.1.tar.gz", "has_sig": false, "md5_digest": "bdab7b097893b27066b2924515fdeb6b", "packagetype": "sdist", "python_version": "source", "requires_python": ">= 3", "size": 3354, "upload_time": "2018-05-08T04:51:04", "url": "https://files.pythonhosted.org/packages/74/6f/7945675139dde7634c01a19f3c6bd8b5385009391779491fe4a583099d3d/RegexOrder-0.1.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "a1f4305582214b931e8be87ee4e07376", "sha256": "9109c00b23424ddefc096a1a1fd538999ff2aa61d1da1159492e60a03949f99b" }, "downloads": -1, "filename": "RegexOrder-0.1.1.tar.gz", "has_sig": false, "md5_digest": "a1f4305582214b931e8be87ee4e07376", "packagetype": "sdist", "python_version": "source", "requires_python": ">= 3", "size": 3380, "upload_time": "2018-05-08T14:47:38", "url": "https://files.pythonhosted.org/packages/77/cf/da8f12c2faf5fa645dd1659c05a74b3ee614e913ad1dd13324d9855d78d2/RegexOrder-0.1.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "4b4a29267206d681fe209f829df378bd", "sha256": "6f2b70cc42f6c31dba275a1c81287441752af6a9644d60364269e8fb8da98b59" }, "downloads": -1, "filename": "RegexOrder-0.2.tar.gz", "has_sig": false, "md5_digest": "4b4a29267206d681fe209f829df378bd", "packagetype": "sdist", "python_version": "source", "requires_python": ">= 3", "size": 3377, "upload_time": "2018-05-19T18:24:37", "url": "https://files.pythonhosted.org/packages/31/2e/ba45fe736713c4673e59ddb9f27f0f72cf83ff0bf2108b8f4b8df93df3d2/RegexOrder-0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "4b4a29267206d681fe209f829df378bd", "sha256": "6f2b70cc42f6c31dba275a1c81287441752af6a9644d60364269e8fb8da98b59" }, "downloads": -1, "filename": "RegexOrder-0.2.tar.gz", "has_sig": false, "md5_digest": "4b4a29267206d681fe209f829df378bd", "packagetype": "sdist", "python_version": "source", "requires_python": ">= 3", "size": 3377, "upload_time": "2018-05-19T18:24:37", "url": "https://files.pythonhosted.org/packages/31/2e/ba45fe736713c4673e59ddb9f27f0f72cf83ff0bf2108b8f4b8df93df3d2/RegexOrder-0.2.tar.gz" } ] }