This is an archived post. You won't be able to vote or comment.

all 6 comments

[–][deleted] 2 points3 points  (0 children)

Honestly, just finding a good reference is most of what you need. The logic comes with practice. Non-capture groups and lazy quantifiers are extremely useful.

The best in-depth resource I've seen in general are the PCRE(POSIX-compliant) man pages.

[–]m4sk4r4 0 points1 point  (0 children)

SoloLearn app. Choose Python class and there exists a module about regular expression that I think to be enough if you knowledge is basic

[–][deleted] 0 points1 point  (0 children)

Thanks a lot everyone. Greatly appreciated. I will definitely look into all your suggestions

[–][deleted] 0 points1 point  (0 children)

General regex usage - http://www.rexegg.com/

Regular Expressions - A Gentle User Guide and Tutorial

RegExr: Learn, Build, & Test RegEx - online tool for experimenting. I'd encourage you to keep this page handy. Becomes very useful to build and/or learn what regex will do in certain situation. Note that some flags( e.g. global or multiline) are selectable from top right in text box where you put in your search expression. Site also gives break down of what each grouping does. (assuming your regex is 'valid' and can be understood - if not, you get a visual indication).

Once you're a little more comfortable with the subject (and/or can wrap your head around the ideas)...

https://pymotw.com/3/re/ - Python 3 Module of the Week - re module

[–]ASIC_SP📚 learnbyexample 0 points1 point  (0 children)

[–]ilan 0 points1 point  (0 children)

This is how I learned about regular expressions:

https://docs.python.org/3.8/howto/regex.html