Click or drag to resize
sqx

RegularExpressionsRegexEscape Method

Function [nvarchar](max) RegexEscape([nvarchar](max) s)

Namespace:  sqx
Assembly:  SQX (in SQX.dll) Version: 1.0.2.6 (1.0.2.6)
Syntax
C#
public static SqlChars RegexEscape(
	SqlChars s
)

Parameters

s
Type: System.Data.SqlTypesSqlChars
[nvarchar](max)

Return Value

Type: SqlChars
[nvarchar](max)
Remarks
Regex Escape function.
Examples
SQL
DECLARE @Pattern nvarchar(4000) = N'John Doe'
SELECT sqx.RegexEscape(@Pattern) EscapedPattern
/*
EscapedPattern
--------------
John\ Doe*/
See Also