Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

Commit 6b67696

Browse files
committed
Remove mention of REGEXP_REPLACE from note on LOB type support in regexp-string-expression.md; clarify string_replacement details in regexp-replace-transact-sql.md
1 parent ff140c7 commit 6b67696

3 files changed

Lines changed: 4 additions & 2 deletions

File tree

docs/includes/regexp-string-expression.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ Can be a constant, variable, or column of character string.
1515
Data types: **char**, **nchar**, **varchar**, or **nvarchar**.
1616

1717
> [!NOTE]
18-
> The `REGEXP_LIKE`, `REGEXP_COUNT`, `REGEXP_INSTR`, `REGEXP_REPLACE`, and `REGEXP_SUBSTR` functions support LOB types (**varchar(max)** and **nvarchar(max)**) up to 2 MB for the *string_expression* parameter.
18+
> The `REGEXP_LIKE`, `REGEXP_COUNT`, `REGEXP_INSTR`, and `REGEXP_SUBSTR` functions support LOB types (**varchar(max)** and **nvarchar(max)**) up to 2 MB for the *string_expression* parameter.

docs/t-sql/functions/regexp-like-transact-sql.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ Boolean value. `true` or `false`.
6464

6565
### SARGability support
6666

67+
**Applies to**: [!INCLUDE [ssazure-sqldb](../../includes/ssazure-sqldb.md)], [!INCLUDE[ssazuremi](../../includes/ssazuremi-md.md)], and [!INCLUDE [fabric](../../includes/fabric.md)]. Currently not supported on [!INCLUDE [ssnoversion-md](../../includes/ssnoversion-md.md)].
68+
6769
`REGEXP_LIKE` supports *SARGability* when the pattern begins with anchor `^` and also the patterns that include quantifiers such as `*`, `+`, `?`, `{n}`, `{n,}`, and `{n,m}`, for example, `^ab+` or `^ab*` etc. It also supports range characters like `[0-9A-Za-z]` and allows the use of backslash `\` to escape the metacharacters. This allows the query optimizer to use index seek operations, improving query performance. However, regular expressions do not honor collation rules, which may lead to differences in behavior when compared to other string comparison functions like `LIKE`, especially on indexed columns with language-specific collations.
6870

6971
For example, in Turkish collation, the characters `i` and `I` are treated distinctly even in the case-insensitive collation due to language-specific rules.

docs/t-sql/functions/regexp-replace-transact-sql.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ REGEXP_REPLACE
4646

4747
#### *string_replacement*
4848

49-
String expression that specifies the replacement string for matching substrings and replaces the substrings matched by the pattern. The string_replacement can be of char, varchar, nchar, and nvarchar datatypes. Also supports LOB types (varchar(max) and nvarchar(max)) up to 2 MB. If an empty string (`''`) is specified, the function removes all matched substrings and returns the resulting string. The default replacement string is the empty string (`''`).
49+
String expression that specifies the replacement string for matching substrings and replaces the substrings matched by the pattern. The string_replacement can be of char, varchar, nchar, and nvarchar datatypes. If an empty string (`''`) is specified, the function removes all matched substrings and returns the resulting string. The default replacement string is the empty string (`''`).
5050

5151
The string_replacement can contain \n, where n is 1 through 9, to indicate that the source substring matching the n'th parenthesized group (subexpression) of the pattern should be inserted, and it can contain `&` to indicate that the substring matching the entire pattern should be inserted. Write \ if you need to put a literal backslash in the replacement text.
5252

0 commit comments

Comments
 (0)