The Python metacharacters, or special characters and sequences, are listed and described in Tables xref linkend="app05table02" remap="E–2"/> and E-3.
Table E-2. Python Metacharacters (Single Characters)
||Matches any character except a newline, by default. If the DOTALL flag has been specified, this matches any character, including a newline.
returns a match object
||Matches at the beginning of a string and, if the MULTILINE flag is used, also matches immediately after each newline. Used as the first character of the expression or group to match at the beginning of a string.
search("^cat","cats") returns a match object search("^cat","a cat") ...