X
xke
This is my function:
<Microsoft.SqlServer.Server.SqlFunction()> _
Public Shared Function RegExMatch(ByVal pattern As String, _
ByVal matchString As String) As Boolean
Dim r1 As Regex = New Regex(pattern.TrimEnd(Nothing),
RegexOptions.Compiled)
Return r1.Match(matchString).Success
End Function
I have noticed that the call:
select dbo.RegexMatch('some_reg_exp_pattern', my_match_content)
will trim my_match_content to 4000 chars.
It means everything over 4000 chars will be ignored. I guess this is
happening because of mapping string to a varchar - which may have a
max 4000 chars.
And my_match_content is actually a column varchar(max).
How can I adapt the function to support biger size strings?
Thanks,
xke
<Microsoft.SqlServer.Server.SqlFunction()> _
Public Shared Function RegExMatch(ByVal pattern As String, _
ByVal matchString As String) As Boolean
Dim r1 As Regex = New Regex(pattern.TrimEnd(Nothing),
RegexOptions.Compiled)
Return r1.Match(matchString).Success
End Function
I have noticed that the call:
select dbo.RegexMatch('some_reg_exp_pattern', my_match_content)
will trim my_match_content to 4000 chars.
It means everything over 4000 chars will be ignored. I guess this is
happening because of mapping string to a varchar - which may have a
max 4000 chars.
And my_match_content is actually a column varchar(max).
How can I adapt the function to support biger size strings?
Thanks,
xke