sublimator wrote:The perl modifiers Jon taught me about the other day work for python, eg prepending the regex with (?i)
(?i)sets as case insensitive
/i makes the regex match case insensitive.
/s enables "single-line mode". In this mode, the dot matches newlines.
/m enables "multi-line mode". In this mode, the caret and dollar match before and after newlines in the subject string.
/x enables "free-spacing mode". In this mode, whitespace between regex tokens is ignored, and an unescaped # starts a comment.
in Python do:
(?simx)YOUR_REGEX_PATTERN
http://www.regular-expressions.info/modifiers.html
Return to Ideas and Feature Requests
Users browsing this forum: No registered users and 7 guests