Click or drag to resize
sqx

RegularExpressionsRegexMatchesTable Method

Function [table] RegexMatchesTable([nvarchar](max) s, [nvarchar](4000) Pattern)

Namespace:  sqx
Assembly:  SQX (in SQX.dll) Version: 1.0.2.6 (1.0.2.6)
Syntax
C#
public static IEnumerator RegexMatchesTable(
	SqlChars s,
	SqlString Pattern
)

Parameters

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

Return Value

Type: IEnumerator
[table]
Remarks
Regex matches table function.

NOTE: Default options of Regex are case sensitive and multiline

Attributes

IsDeterministic = true, IsPrecise = true, DataAccess = DataAccessKind.None, SystemDataAccess = SystemDataAccessKind.None, TableDefinition = "Position int, Value nvarchar(max)"
Examples
SQL
DECLARE @s nvarchar(max) = N'This is a word split test.'
SELECT * FROM sqx.RegexMatchesTable(@s, N'\w+')
/*
Position    Value
----------- -----
1           This
6           is
9           a
11          word
16          split
22          test*/
See Also