Python Regular Expressions

newpythonlogoThe Python Standard Library > 6. Text Processing Services > re

Regular expressions HOWTO:
For … science underlying regular expressions (deterministic and non-deterministic finite automata), you can refer to almost any textbook on writing compilers.

Metacharacters are not active inside classes: … '$' is usually a metacharacter, but inside a character class it’s stripped of its special nature.

Perhaps the most important metacharacter is the backslash, \.

Some of the special sequences beginning with '\' represent predefined sets of characters

* doesn’t match the literal character *; instead, it specifies that the previous character can be matched zero or more times, instead of exactly once.

Pay careful attention to the difference between * and +;

match() versus search()


Regular expressions

Python Regular Expressions

Christopher Potts emoticons

Python: Regular expressions
University of Cambridge


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s