titus.producer.tools.RegEx

class titus.producer.tools.RegEx(pattern, to=None, flags=None)[source]

Bases: titus.producer.tools.Matcher

Match a string with a regular expression.

If ‘to’ is given, this provides a substitution (using 1, 2, etc. variables). The ‘flags’ are iLmsux, corresponding to Python regular expression flags.

__init__(pattern, to=None, flags=None)
getmatch(haystack)