11.1 Literals


In a regular expression, any character that is not a metacharacter has its normal literal meaning. This includes the lowercase and uppercase alphabet and the digits, plus some punctuation marks, such as the colon and the exclamation mark. Many other punctuation characters and symbols are metacharacters and have a special meaning. For example, the regular expression "cat" means: the letter `c', followed by the letter `a', followed by the letter `t'.
"cat" \(\Rightarrow\) The cat sat on the mat.


Paul Murrell

Creative Commons License
This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 New Zealand License.