Search text with regular expressions
The following regular expressions can replace characters or digits in the Find what field of the SQL Server Management Studio Find and Replace dialog box.
Search using regular expressions
To enable the use of regular expressions in the Find what field during Quick Find, Find in Files, Quick Replace, or Replace in Files operations, select the Use option under Find Options and then choose Use Regular Expressions.
The Expression Builder button next to the Find what field then becomes available. Select this button to display a list of the available regular expressions. When you choose any item from the Expression Builder, it is inserted into the Find what string.
The following table describes the regular expressions available in the Expression Builder.
|Match any single character (except a line break)
|Match any character zero or more times
|Match any character one or more times
|Match any character in the set
|Match any character not in the set
|Match any numeric character
|Match any whitespace character
|Match at beginning or end of word
|Match at beginning of line
|Match any line break
|Match a word character at end of line
|Capture and implicitly number the expression
dog|cat and name it