lvphj / epydemiology

Python code for epidemiologists – eventually
MIT License
8 stars 2 forks source link

phjReverseMap fails if capture groups included in regexes #33

Closed lvphj closed 4 years ago

lvphj commented 5 years ago

phjReverseMap() fails if named groups or capture groups included in regexes (i.e. if round brackets are included in the regular expression). Needs further investigation.

lvphj commented 4 years ago

Added assert statements to phjCreateNamedGroupRegex() function to identify whether the regex function contained i) (?P<...> (using regex '(\?P<\w+>') and ii) round parenthesis where opening bracket is not followed by a question mark (using regex '((?!\?).+?)').