Regular Expressions Quickguide

Regular expressions are a sequence of characters that form a search pattern. They can be used to search complex queries not easily accomplished by advanced searches, and are generally recommended for power users only. Here are a few commonly used regular expression metacharacters:

Metacharacter(s) Meaning
^ The beginning of the string.
$ The end of the string.
^expression$ The entire string.
. Any single character.
* Matches the preceding character 0 or more times.
+ Matches the preceding character 1 or more times.
? Matches the preceding character 0 or 1 time.
{digit} Matches the preceding character exactly digit times.
[expression] Character set. Matches any one of the characters between the brackets. Also used to denote range (ex. [0-9] for any digit)
(expression) Subexpression
| Matches the expression before or after the metacharacter
\metacharacter Turns a metacharacter into a character. (ex. \$ searches for the $ character in the string.

Regular expression examples

The user wants a list of bugs with a Business Priority between 800-899

^8[0-9][0-9]$

The user wants a list of bugs with a Business Priority between 0-99

^[0-9]?[0-9]$

The user wants a list of bugs written by a SUSE, NetIQ, or Novell employee

@(suse\.com|netiq\.com|novell\.com)$