{ "info": { "author": "Andy Chase", "author_email": "theandychase@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "Reparse\n=======\n\n*Python library/tools for combining and parsing using Regular Expressions in a maintainable way*\n\n[|Build Status| `Download/View Source on Github`_] [`Docs at ReadtheDocs`_]\n\nThis library also allows you to:\n\n- Maintain a database of Regular Expressions\n- Combine them together using Patterns\n- Search, Parse and Output data matched by combined Regex using Python functions.\n\nThis library basically just gives you a way to combine Regular Expressions together\nand hook them up to some callback functions in Python.\n\nA Taste / Getting Started\n=========================\n\n(See the examples/ directory for a full code examples)\n\nSay your fashionista friend must know what colors their friends like at certain times.\nLuckily for you two, your friend's friends are blogging fanatics and you have downloaded thousands\nof text documents containing their every thought.\n\nSo you want to get (color and time) or ``[('green', datetime.time(23, 0))]`` out of text like::\n\n blah blah blah go to the store to buy green at 11pm! blah blah\n\nIf you need scan/search/parse/transform some unstructured input and get some semi-structured data\nout of it Reparse might be able to help.\n\nFirst structure some Regular Expressions (Here, in Yaml)\n--------------------------------------------------------\n\n.. code-block:: yaml\n\n Color:\n Basic Color:\n Expression: (Red|Orange|Yellow|Green|Blue|Violet|Brown|Black)\n Matches: Orange | Green\n Non-Matches: White\n Groups:\n - Color\n\n Time:\n Basic Time:\n Expression: ([0-9]|[1][0-2]) \\s? (am|pm)\n Matches: 8am | 3 pm\n Non-Matches: 8a | 8:00 am | 13pm\n Groups:\n - Hour\n - AMPM\n\nThen structure some Patterns with those expressions (Yaml)\n----------------------------------------------------------\n\n.. code-block:: yaml\n\n BasicColorTime:\n Order: 1\n Pattern: |\n \\s? at \\s?