Next: Special Texts, Previous: Regular Expressions, Up: Top [Contents][Index]
Regular expressions are based on POSIX EREs (Extended Regular Expressions). Regexps are composed of characters. Here is a short-list of them all:
cmatches the character c (assuming c is none of the characters listed below).
\cmatches the literal character c.
.matches any character.
^matches the beginning of a string.
$matches the end of a string.
[abc…]matches any of the characters abc… (character list).
[[:keyword:]]matches any character in the character class keyword.
Allowable classes are alnum, alpha, blank,
cntrl, digit, graph, lower, print,
punct, space, upper, and xdigit.
[[.element.]]matches the multi-character collating element. Gcal does not currently support collating symbols.
[[=list=]]matches any of the equivalent characters in list. Gcal does not currently support equivalence classes.
[^abc…]matches any character except abc… (negated resp. complemented character list).
r1|r2matches either r1 or r2 (alternation).
r1r2matches r1, and then r2 (concatenation).
r+matches one or more r’s.
r*matches zero or more r’s.
r?matches zero or one r’s.
(r)matches r (grouping).
r{n}r{n,}r{n,m}matches at least n, n to any number, or n to m occurrences of r (interval expressions).
\bmatches the empty string at either the beginning or the end of a word.
\Bmatches the empty string within a word.
\<matches the empty string at the beginning of a word.
\>matches the empty string at the end of a word.
\wmatches any word-constituent character (alphanumeric characters and the underscore).
\Wmatches any character that is not word-constituent.
\`matches the empty string at the beginning of a buffer81.
\'matches the empty string at the end of a buffer.
Next: Special Texts, Previous: Regular Expressions, Up: Top [Contents][Index]