Regular Expressions (regexp)

Regular Expressions, often abbreviated REGEXP (or regexp), is a standardized way to make patterns that match certain strings. Normal characters, such as A through Z only match themselves, but some characters have special meanings that allow very powerful matching rules to be created.

Pattern Name Matches
. dot or period Any ONE character
[abc] set a, b, or c
[a-z] set Any character from a to z, inclusive
[^ac] set Any character EXCEPT a or c
(x)   x where x might be any regexp
x*   Zero or more (consecutive) occurrences of x, where x might be any regexp
x+   One or more (consecutive) occurrences of x, where x might be any regexp
x?   Zero or one occurrence of x, where x might be any regexp
x|y   x or y, where x and/or y might be any regexp
xy   xy, where x and/or y might be any regexp
^ caret beginning of string, but no characters
$ dollar sign end of string, but no characters
\< backslash, less than beginning of a word, but no characters
\> backslash, greater than end of a word, but no characters

Some examples

Regular Expression Matches
[0-9]+ One or more numeric characters
(deu)|(pdm) Either "deu" or "pdm"
\.CBP$ Any string ending in "CBP"
^\. Any string starting with a period
C3[15].U[135].T[13579][13579] All of the odd stage temps in the odd cells of the odd units of the "00" buildings
C3..U..[FG] All of the cell pressures in the plant (both 'regular' and freezer/sublimer)

NOTE: A backslash (\) may be used to quote (or escape) any of the special characters so that they match themselves.