You can perform advanced text pattern matching using regular expressions. Regular expressions provide more flexibility than simple wildcards in defining rules or views. To match an exact regular expression character, precede the character with a backslash (\). The following table lists regular expression operators and their definitions.
Menu Item | Character | Definition | ||||||||||||||||||||||||||||||||||||||||||||||||
Any Character | . | Matches any single character. | ||||||||||||||||||||||||||||||||||||||||||||||||
Character in Range | [ ] | Matches any single character from within the bracketed list. Within square brackets, most characters are interpreted literally. | ||||||||||||||||||||||||||||||||||||||||||||||||
Character Not in Range | [^] | Specifies a set of characters not to be matched. | ||||||||||||||||||||||||||||||||||||||||||||||||
Beginning of Line | ^ | Matches the beginning of a line. | ||||||||||||||||||||||||||||||||||||||||||||||||
End of Line | $ | Matches the end of a line. | ||||||||||||||||||||||||||||||||||||||||||||||||
Or | | | Matches either the regular expression preceding it or the regular expression following it. | ||||||||||||||||||||||||||||||||||||||||||||||||
Group | ( ) | Groups one or more regular expressions to establish a logical regular expression consisting of sub-regular expressions. Used to override the standard precedence of certain operators. | ||||||||||||||||||||||||||||||||||||||||||||||||
0 or 1 Matches | ? | Specifies that the preceding regular expression is matched 0 or 1 time. | ||||||||||||||||||||||||||||||||||||||||||||||||
0 or More Matches | * | Specifies that the preceding regular expression is matched 0 or more times. | ||||||||||||||||||||||||||||||||||||||||||||||||
1 or More Matches | + | Specifies that the preceding regular expression is matched 1 or more times. | ||||||||||||||||||||||||||||||||||||||||||||||||
Exactly nMatches | {n} | Specifies that the preceding regular expression is matched exactly nnumber of times. | ||||||||||||||||||||||||||||||||||||||||||||||||
At Least nMatches | {n,} | Specifies that the preceding regular expression is matched nor more times. | ||||||||||||||||||||||||||||||||||||||||||||||||
At Most nMatches | {,n} | Specifies that the preceding regular expression is matched nor fewer times. | ||||||||||||||||||||||||||||||||||||||||||||||||
nto mMatches | {n,m} | Specifies that the preceding regular expression is matched a
maximum of
ntimes and a minimum of
mtimes. If not specified,
mdefaults to 0.
If nis not specified, the default depends on whether the comma is present. If no comma is present, ndefaults to m. If a comma is present, ndefaults to a very large number. | ||||||||||||||||||||||||||||||||||||||||||||||||
New Line Character | \n | Matches a new line. | ||||||||||||||||||||||||||||||||||||||||||||||||
Tab Character | \t | Matches a tab character. |
Example | Matches | Does Not Match |
st.n
|
Austin and Houston | Webster |
st[io]n
|
Austin and Houston | Stanton |
st[^io]n
|
Stanton | Austin or Houston |
^houston
|
Houston | South Houston or Fort Sam Houston |
ston$
|
Houston and Galveston | Stonewall |
dall|hart
|
Dallas and Dalhart and Lockhart | Dale |
dal(l|h)art
|
Dalhart | Dallas or Lockhart |
il?e$
|
Etoile and Wylie | Beeville |
il*e$
|
Etoile and Wylie and Beeville | Bellaire |
il+e$
|
Etoile and Beeville | Wylie |
ad{2}
|
Addison and Caddo | Adkins |
(la.*){2,}
|
Highland Villiage and Lake Dallas | Laredo |
il{,1}e$
|
Bowie and Etoile | Brownsville |
(a.*){2,3}
|
Alamo Heights and La Blanca | Austin or Aransas Pass |
not ville
|
Houston and Dallas | Brownsville |