Guide to regular expressions

A “regular expression” (or regex) essentially is the use of a pattern for string manipulation.

Regular expressions are used in many scripting and programming languages as they are a very powerful tool, allowing you to match and replace strings based on the supplied pattern.

Regular expressions aren’t always that simple, however there are things you can do to make it as easy as possible.

Some people, when confronted with a problem, think I know, Ill use regular expressions. Now they have two problems.

Jamie Zawinski, in comp.lang.emacs

Hope this helps!