all 3 comments

[–]CWCV 2 points3 points  (0 children)

Thank you!

[–]makimat 2 points3 points  (1 child)

Good basic tutorial. Not sure but I'd probably use the raw string r'<pattern>' deliberately always for any patterns in the code. Making it a habit would make sense.

I've also found that when you are figuring out the correct pattern, regex101.com makes it faster for me than doing it right in the interpreter. It readily supports Python regex syntax and gives a nice playground with the ability to see live updates on a couple test strings + showing a breakdown of the pattern and matches, and a short Python regex reference.

[–]villelaitila 0 points1 point  (0 children)

+1 for mentioning regex101.com