I have the following string in database:
SET @Value = "[4888378977CA4A5] Test String"
Also, the @Value may also have ‘RE: ‘ at the start of the string such as:
SET @Value = "RE: [4888378977CA4A5] Test String"
How can I access the 4888378977CA4A5 part of the string using regular expressions?
Thanks!
T-SQL doesn’t have native regex support. You can use a CLR function to access .NET regex functionality or use PatIndex if the pattern is simple.
Or if you just want to get the contents of
[...]maybe CharIndex would work.Returns