We have a table called with a column which is purely HTML. I need to do a find a pattern like [4digit max]_[6digit number]. Is that possible?
2 Answers
For Microsoft SQL Server, see here:
select * from Notif_Template
where dbo.regexMatch( Notif_body, '([^0-9]|^)[0-9]{1,4}_[0-9]{6}([^0-9]|$)' ) = 1;
dbo.regexMatch returns if there's a match and 0 otherwise.
4digit max0 to 4 digits or 1 to 4 digits?