Regular Expression Validation Limitations Possible in SQL Server

I am trying to find a way to validate data in my columns using CHECK constraints for regular expressions, but so far they only come across a keyword LIKEthat has an extremely limited subset of regular expression syntax. I would like to know if there is a way to use regular expression in control constraints?

I am using SQL Server 2005 and 2008.

+3
source share
2 answers

I think you can create a scalar UDF CLR that can use the RegEx classes of the .NET.NET class, and then call this from your validation constraint.

, ( " ", , ).

+4

All Articles