View Full Version : python re module: how does it work?

February 11th, 2011, 09:31 PM
How does the python 're' module work? We just had a programming contest at school that needed pattern matching and i felt like i was cheating by using re... So now im wondering how i can code re myself, for which i need an understanding of how it works. Im a beginner-intermediate python user and have used the basics to do a lot but haven't gone things beyond functions (so havent done classes yet)

February 11th, 2011, 09:55 PM
regex theory is serious business, my advice: don't go there

but if you really really want - code is here:

February 11th, 2011, 10:50 PM
Very serious business...

February 11th, 2011, 11:19 PM
this site explains how it works internally a bit in its tutorial.
its also a good resource for regex in general