Fix regex compile issue "invalid escape sequence"

This commit is contained in:
Viet Nguyen 2024-11-12 17:07:09 +07:00 committed by GitHub
parent da70378297
commit f8e938481d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -165,8 +165,8 @@ BYTES_SEND = Counter()
class Tools:
IP = compile("(?:\\d{1,3}\\.){3}\\d{1,3}")
protocolRex = compile('"protocol":(\\d+)')
IP = compile(r"(?:\d{1,3}\.){3}\d{1,3}")
protocolRex = compile(r'"protocol":(\d+)')
@staticmethod
def humanbytes(i: int, binary: bool = False, precision: int = 2):