Escaping Special Characters
RX · Basic Patternssyntax
\. \* \+ \? \( \) \[ \] \{ \} \^ \$ \| \\example
JS: 'Price: $9.99'.match(/\$\d+\.\d{2}/)
Py: re.search(r'\$\d+\.\d{2}', 'Price: $9.99')output
"$9.99"Note All special regex characters must be escaped with a backslash to match literally. The special characters are: . * + ? ( ) [ ] { } ^ $ | \. In Python raw strings (r'...'), you only escape for regex, not for Python itself.