Pattern Matching with REGEXP
REGEXP Search Patterns Definition of the Pattern
abc The string abc.
(abc) The string abc (formed into a group) .
[abc] One of the characters a, b, c.
[a-z] A character in the range a to z.
[^abc] None of these characters (but any other).
. Any character.
x The expression x must appear once.
x|y The expression x or y must appear once.
x? The expression x may appear once (or not at all) .
x* The expression x may appear arbitrarily often (or not at all).
x+ The expression x may appear arbitrarily often, but at least once.
x{n} The expression x must appear exactly n times.
x{,n} The expression x may appear at most n times.
x{n,} The expression x must appear at least n times.
x{n,m} The expression x must appear at least n and at most mtimes.
^ Placeholder for the beginning of the string.
$ Placeholder for the end of the string.
\x Special character x (e.g., \$ for $).
Related examples in the same category