The module defines two functions and a handful of constants.
pattern[, syntax=None]) |
s[, quote=None]) |
This is similar to repr but will return a "raw" string (r'...' or r"...") when the string contains backslashes, instead of doubling all backslashes. The resulting string does not always evaluate to the same string as the original; however it will do just the right thing when passed into re.compile().
The optional second argument forces the string quote; it must be a single character which is a valid Python string quote. Note that prior to Python 2.5 this would not accept triple-quoted string delimiters.
sed
-style or emacs
-style regular expressions.
sed
-style or emacs
-style regular expressions.
+
and ?
characters. This should be
added to the syntax arg of convert when converting
sed
-style regular expressions and omitted when converting
emacs
-style regular expressions.
|
.