RegularExpression¶
Represents a regular expression pattern for string matching.
Escaping¶
The syntax is PCRE, where a backslash before a character that needs no escaping simply means that character. Patterns written by hand often escape liberally, and those escapes are accepted:
An escape that does mean something keeps its meaning — \. still matches
only a literal dot: