Using regular expressions in search

The Search tool will search for an exact match to text in the Find box, unless you specify match conditions using regular expressions, special meta characters, and predefined regular expressions.

Entering the string FUNCTION, will find FUNCTION or function, but not the string fun. If the Search option case sensitive is checked, the search will distinguish between uppercase and lowercase letters.

Meta Characters

  • The meta character \ matches the character following it, except when followed by a left or right round bracket, a digit 1 to 9, or a left or right angle bracket.
  • The special characters "]" and "-" have no special meaning if they appear as the first characters in the set.
Table 1. Meta Characters.

This table provides the wildcard symbol or syntax, a description, an example expression, and examples of strings that match the example expression. For some entries, more than one example expression - string match pair are provided.

Wildcard Description Example expressions Matches any string
. Substitutes for any single character
  • fla.
  • containing four letters that begin with fla: flag, FLAG, flannel
  • b.g
  • containing three letters in the format bxg: big, bog, Bog, bag
* Substitutes for zero or more occurrences of the preceding expression/character
  • a *b (notice the blank before the *)
  • "a" followed by zero or more blanks then "b" "a basic" "abasic"
+ Substitutes for one or more occurrences of the preceding expression/character
  • a +b (notice the blank before the +)

  • "a" followed by one or more blanks then "b" "a basic" "a basic"

\ Searches for the character following; this cancels the special significance of the meta characters including itself, allowing a search for them. When used in a set, it is treated as an ordinary character.
  • \+100
  • containing +100; treats + as an ordinary character
  • \\user
  • containing \user; treats \ as an ordinary character
[set] Defines a set of characters enclosed in square brackets ([...]) to be used for matching; may define character ranges, as in [a-z] and [0-9]. If the first character in the set is "^", it matches any character NOT in the set.
  • [bd]og
  • containing bog, dog
  • [Tt]ooltip
  • containing Tooltip, tooltip
  • b[^o]g
  • containing three characters, b, <any character but o>, g: bag, big
  • [A-Da-d]+
  • containing one of the alpha characters a through d inclusive, in uppercase or lowercase: define, Define, age
x | y Matches either expression x or expression y (composite expression)
  • bob|bog
  • containing either string: bob or bog
xy Strings multiple expressions together, finding a single string containing expression x and expression y (composite expression)
  • def.* iti.*
  • containing the string def, any characters including none, and then the string iti:definition
^ $ Restricts the pattern matching to strings at the beginning of the line ( ^ character) and/or the end of the line ($ character),
  1. ^when
  2. test.$
  1. with when at the beginning of the line
  2. with test. at the end of the line.