Know your Regular Expressions

June 18, 2007
You can build and test regular expressions (regexps) on UNIX® systems in several ways. Discover the available tools and techniques that can help you learn how to construct regular expressions for various programs and languages.

A regular expression is a notation for describing a pattern that matches a set of strings and this is common across many programs and languages. These various regexp implementations differ to some degree in the finery of their details, but the principles for learning to build regexps are common for all.

If you want to quickly master regular expressions, do read the concise Regular Expressions Tutorial.

For example, in Linux there are different grep implementations such as - grep, egrep, fgrep and so on. And each of them differ from the other in slight manner.

egrep and fgrep are generally considered to be superior to grep and support additional features not available in grep.

Michael Stutz - the author of "The Linux cookbook" and with over 20 years experience under his belt has written a very informative article describing some useful tools and techniques for learning to build and hone regexps across a range of UNIX® applications. He walks you through useful tasks such as highlighting matches,showing only the matches and not the lines, calling a wizard and studying docs.