1. \d can match a number. ' 00\d ' can match ' 007 '.
2. \w can match one character. ' \w\w\d ' can match ' py3 '.
3.. can match any character. ' Py. ' Can match ' PYc ', ' pc0 ', ' py! ',
4. * denotes any character (including 0).
5. + represents at least one character.
6.? Represents a 0 or 1 character.
7. {n} represents n characters.
8.{n,m} represents a n~m character.
9.[0-9a-za-z\_] can match a number, letter, or underscore.
10.[0-9a-za-z\_]+ can match a string of at least one number, letter, or underscore. such as ' A100 ', ' 0_z '.
11.[a-za-z\_][0-9a-za-z\_]* can match the beginning of a letter or underscore, followed by a string consisting of a number, letter, or underscore, which is the legal variable of Python.
12.[A-ZA-Z\_][0-9A-ZA-Z\_]{0,19} More precisely restricts the length of a variable to 1-20 characters. (up to 19 characters in front of one character + later).
12. | B can match A or b. [P|p]ython can match ' python ' or ' python '.
14. ^ Represents the beginning of the line, and $ represents the end of the line. ^\d indicates that a number must end. \d$ indicates that a number must end. The py can match ' python ', but ^py$ only matches ' py ' and matches the entire line.
\s can match a space (also including a blank character such as tab).
Python Regular Expressions