Trees | Indices | Help |
|
---|
This file is only retained for backwards compatibility. It will be removed in the future. sre was moved to re in version 2.5.
4
16
32
2
8
4
2
16
32
64
64
8
Imports: warnings, __all__
Return an iterator over all non-overlapping matches in the string. For each match, the iterator returns a match object.
Empty matches are included in the result.
Return a 2-tuple containing (new_string, number). new_string is the string obtained by replacing the leftmost non-overlapping occurrences of the pattern in the source string by the replacement repl. number is the number of substitutions that were made. repl can be either a string or a callable; if a callable, it's passed the match object and must return a replacement string to be used.
Return a list of all non-overlapping matches in the string.
If one or more groups are present in the pattern, return a list of groups; this will be a list of tuples if the pattern has more than one group.
Empty matches are included in the result.
Return the string obtained by replacing the leftmost non-overlapping occurrences of the pattern in string by the replacement repl. repl can be either a string or a callable; if a callable, it's passed the match object and must return a replacement string to be used.
Trees | Indices | Help |
|
---|