SQL Server Regular Expression Performance and Guidelines


 

SQL Server 2025 introduces regular expression (regex) functions to the TSQL language. You could do this in previous versions with user defined CLR functions, but the 2025 functions are natively available and supported by Microsoft. I prefer native functionality when it is available due to the rigorous testing involved with vendor products and the automatic updates and bug fixes. Regex functions are no different. If my team doesn’t have to do the development and maintenance on a feature, I’m going to take advantage of it if performance and functionality are close enough.

I started writing this post with the intention