How to recover fields with the following pattern?
a111/1111
or a111_1111
or a111-1111
or a111+1111
where:
a = some letter of the alphabet;
1 = any digit of 1-9;
I mounted a Regex
that is working perfectly: (^[a-z]{1})([0-9]{3})(\W)([0-9]{4})
but I can not apply it to SQL Server, I tried using LIKE as in that question example:
SELECT * FROM Table WHERE Campo like '%(^[a-z]{1})([0-9]{3})(\W)([0-9]{4})%'
or
SELECT * FROM Table WHERE Campo like '%[(^[a-z]{1})([0-9]{3})(\W)([0-9]{4})]%'
But it does not work, is there a way to do a query using a Regex?