A wrapper for the regex library for advanced pattern management

Basic usage

The Engine loads Regular Expression pattern templates written in *.json files from the provided directory, builds and compiles them in the following fashion:

example of template models/dates.json :

{ "day": [ "3[01]", "[12][0-9]", "0?[1-9]" ], "month": [ "0?[1-9]", "1[012]" ], "year": [ "\\d{4}" ], "date": [ "{{day}}/{{month}}/{{year}}", "{{year}}-{{month}}-{{day}}" ], "patterns": [ "{{date}}" ] }

will result in the following regex:

(?P<date_0>(?P<day_0>[12][0-9]|0?[1-9]|3[01])/(?P<month_0>0?[1-9]|1[012])/(?P<year_0>\d{4})|(?P<year_1>\d{4})-(?P<month_1>0?[1-9]|1[012])-(?P<day_1>[12][0-9]|0?[1-9]|3[01]))