Today we are going to discuss regular expressions.
Image by dberlind via Flickr
What are regular expressions (how do they differ from non-regular expressions?)
Here is a helpful definition from Wikipedia:
In computing, a regular expression, also referred to as regex or regexp, provides a concise and flexible means for matching strings of text, such as particular characters, words, or patterns of characters. A regular expression is written in a formal language that can be interpreted by a regular expression processor, a program that either serves as a parser generator or examines text and identifies parts that match the provided specification.
Who Needs regular expressions?
Situations where regular expressions shine:
The above selling point for regex was adapted from the Bare Bones Software website. Bare Bones makes a free product called TextWrangler, that includes support for regular expressions, including the ability to search multiples files and directories.