Regular Expressions

Regular Expressions
The world of Regular Expressions isn't as simple as it could be: there exist many versions of them: POSIX defines Basic (BRE) and Extended Regular expressions, and in addition every language and tool tries to come up with its own enhanced set (Perl, GNU utils, emacs, ...) This an incomplete, perhaps not even correct short reference list of some common denominator of Regular Expressions. Unfortunately I have no idea where I got it from.

The Syntax of Regular Expressions
The syntax of regular expression is basically the combination of the metacharacters and the regular characters. For example: ^My          matches line starting with the word "My" finally$     matches ending with the word "finally" ^I am a boy$ matches the whole line of the sentence "I am a boy" \$10         matches "$10", meaning of $ is turned off t.e          matches "t" followed by any one character and then an "e" my*          matches "m" and followed by any number of occurrences of "y" th.*         matches "th" and followed by any characters including no character [124]        matches one of "1" or "2" or "4" [12−46]      matches one of "1" or "2" or "3" or "4" or "6". Expanded as "2−4", not twelve to forty-six. [^abc]       matches any one except "a" and "b" and "c"