API¶
Set of functions to generate regular expressions from a pattern similar to printf function.
-
regexpgen.
integer
(format, min=None, max=None, matchStartEnd=True)¶ Generate regular expression for an integer.
Parameters: - format – format similar to C printf function
- min – optional minimum value
- max – optional maximum value
- matchStartEnd – True if ^ at the beginning and $ at the ending of regexp are required
Returns: regular expression for a given format
-
regexpgen.
nnint
(format, min=None, max=None, matchStartEnd=True)¶ Generate regular expression for a non negative integer.
Parameters: - format – format similar to C printf function
- min – optional minimum value
- max – optional maximum value
- matchStartEnd – True if ^ at the beginning and $ at the ending of regexp are required
Returns: regular expression for a given format