Wondering if it is possible to incorporate regular expressions into a SQL statement on SQL Server? I'm only finding that Oracle supports Regular Expressions.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
No, not without extra help such as writing a CLR function or something similar. T-SQL doesn't have builtin support for regular expressions.
回答2:
SQL Server supports limited pattern matching in the PATINDEX and LIKE expressions.
There's no native regex support in SQL Server, but you can expose the functionality in SQL Server 2005+ via CLR.