Skip to content

Conversation

@maltelau
Copy link

@maltelau maltelau commented Dec 2, 2025

\d is interpreted as the byte "\d" rather than the characters "" and "d" which the python regex engine is looking for. Double backslash escapes the "" to produce the correct behaviour. In python 3.6 and onwards, this bug produces
SyntaxWarning: invalid escape sequence '\d'

Alternatively, the regex strings could be changed to r"\d" raw strings instead.

\d is interpreted as the byte "\d" rather than the characters "\" and
"d" which the python regex engine is looking for. Double backslash
escapes the "\" to produce the correct behaviour. In python 3.6 and
onwards, this bug produces
SyntaxWarning: invalid escape sequence '\d'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant