You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/2014/relational-databases/scripting/search-text-with-regular-expressions.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,7 +23,7 @@ manager: craigg
23
23
24
24
#### To find using regular expressions
25
25
26
-
1. To enable the use of regular expressions in the **Find what** field during **QuickFind**, **FindinFiles**, **Quick Replace**, or **Replace in Files** operations, select the **Use** option under **Find Options**and choose **Regular expressions**.
26
+
1. To enable the use of regular expressions in the **Find what** field during **QuickFind**, **FindinFiles**, **Quick Replace**, or **Replace in Files** operations, select the **Use** option under **Find Options**and choose **Regular expressions**.
27
27
28
28
2. The triangular **Reference List** button next to the **Find what** field then becomes available. Click this button to display a list of the most commonly used regular expressions. When you choose any item from the Expression Builder, it is inserted into the **Find what** string.
29
29
@@ -58,7 +58,7 @@ manager: craigg
58
58
|----------------|------------|-----------------|
59
59
|Minimal - zero or more|@|Matches zero or more occurrences of the preceding expression, matching as few characters as possible.|
60
60
|Minimal - one or more|#|Matches one or more occurrences of the preceding expression, matching as few characters as possible.|
61
-
|Repeat n times|^n|Matches n occurrences of the preceding expression. For example, [0-9]^4 matches any 4-digit sequence.|
61
+
|Repeat n times|^n|Matches n occurrences of the preceding expression. For example, [0-9]^4 matches any four digit sequence.|
62
62
|Grouping|()|Groups a subexpression.|
63
63
|nth tagged text|\n|In a **Find or Replace** expression, indicates the text matched by the nth tagged expression, where n is a number from 1 to 9.<br /><br /> In a **Replace** expression, \0 inserts the entire matched text.|
64
64
|Right-justified field|\\(w,n)|In a **Replace** expression, right-justifies the nth tagged expression in a field at least *w* characters wide.|
Regular expressions are a concise and flexible notation for finding and replacing patterns of text. A specific set of regular expressions can be used in the **Find what** field of the [!INCLUDE[ssManStudioFull](../../includes/ssmanstudiofull-md.md)]**Find and Replace** dialog box.
23
+
24
+
Regular expressions are a concise and flexible notation for finding and replacing patterns of text. A specific set of regular expressions can be used in the **Find what** field of the [!INCLUDE[ssManStudioFull](../../includes/ssmanstudiofull-md.md)]**Find and Replace** dialog box.
24
25
25
-
#### To find using regular expressions
26
+
##Find using regular expressions
26
27
27
-
1. To enable the use of regular expressions in the **Find what** field during **QuickFind**, **FindinFiles**, **Quick Replace**, or **Replace in Files** operations, select the **Use** option under **Find Options**and choose **Regular expressions**.
28
+
1. To enable the use of regular expressions in the **Find what** field during **QuickFind**, **FindinFiles**, **Quick Replace**, or **Replace in Files** operations, select the **Use** option under **Find Options**and choose **Regular expressions**.
28
29
29
30
2. The triangular **Reference List** button next to the **Find what** field then becomes available. Click this button to display a list of the most commonly used regular expressions. When you choose any item from the Expression Builder, it is inserted into the **Find what** string.
30
31
31
32
> [!NOTE]
32
-
> There are syntax differences between the regular expressions that can be used in **Find what** strings and those that are valid in [!INCLUDE[msCoName](../../includes/msconame-md.md)] .NET Framework programming. For example, in **Find and Replace**, the braces notation {} is used for tagged expressions. So the expression "zo{1}" matches all occurrences of "zo" followed by the tag 1, as in "Alonzo1" and "Gonzo1". But within the .NET Framework, the notation {} is used for quantifiers. So the expression "zo{1}" matches all occurrences of "z" followed by exactly one "o", as in "zone" but not "zoo".
33
+
> There are syntax differences between the regular expressions that can be used in **Find what** strings and those that are valid in [!INCLUDE[msCoName](../../includes/msconame-md.md)] .NET Framework programming. For example, in **Find and Replace**, the braces notation {} is used for tagged expressions. So the expression "zo{1}" matches all occurrences of "zo" followed by the tag 1, as in "Alonzo1" and "Gonzo1". But within the .NET Framework, the notation {} is used for quantifiers. So the expression "zo{1}" matches all occurrences of "z" followed by exactly one "o", as in "zone" but not "zoo".
33
34
34
35
The following table describes the regular expressions available in the **Reference List**.
|Minimal - zero or more|@|Matches zero or more occurrences of the preceding expression, matching as few characters as possible.|
61
62
|Minimal - one or more|#|Matches one or more occurrences of the preceding expression, matching as few characters as possible.|
62
-
|Repeat n times|^n|Matches n occurrences of the preceding expression. For example, [0-9]^4 matches any 4-digit sequence.|
63
+
|Repeat n times|^n|Matches n occurrences of the preceding expression. For example, [0-9]^4 matches any four digit sequence.|
63
64
|Grouping|()|Groups a subexpression.|
64
65
|nth tagged text|\n|In a **Find or Replace** expression, indicates the text matched by the nth tagged expression, where n is a number from 1 to 9.<br /><br /> In a **Replace** expression, \0 inserts the entire matched text.|
65
66
|Right-justified field|\\(w,n)|In a **Replace** expression, right-justifies the nth tagged expression in a field at least *w* characters wide.|
0 commit comments