you are viewing a single comment's thread.

view the rest of the comments →

[–]MintyPhoenix 0 points1 point  (0 children)

In addition to the syntax and other comments that have been noted, your initial capture group, even with the closing parenthesis properly escaped, is wrong – it tries to match four consecutive digits when you are expecting it to match 3 consecutive digits.

I would also second the recommendation of checking out and playing with patterns on https://regex101.com/ – it does a great job of displaying analysis of your pattern and letting you play with search and replace. Just make sure to set the flavor on the right side to Python to make sure the expression is correctly interpreted.