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 -
fgrepand so on. And each of them differ from the other in slight manner.
fgrepare generally considered to be superior to
grepand 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.