The regular expression is a notation for pattern matching, widespread in shell programming though the Bourne shell itself doesn't use it. Regular expressions resemble the wild card notation the shell does use in case and globbing, but they're more useful and a little more complex. Awk , sed and egrep use regular expressions. There are two kinds, basic and extended regular expressions.
Some utilities use basic and others use extended.
They're essentially very similar. A hyphen can be used as shorthand for all characters in the range between them. Beginning of line. Any number of occurrences of the preceding pattern, including zero occurrences.