This repository was archived by the owner on Jun 22, 2022. It is now read-only.

Description
|
self.ps1_pattern = re.compile(r'^\[?.*@.*\]?[\$#]\s|mysql>\s') |
前面不应该加r, 参考:
The solution is to use Python’s raw string notation for regular expression patterns; backslashes are not handled in any special way in a string literal prefixed with 'r'. So r"\n" is a two-character string containing '' and 'n', while "\n" is a one-character string containing a newline. Usually patterns will be expressed in Python code using this raw string notation.
https://docs.python.org/3.6/library/re.html