I have this regular expression in my sql query
DECLARE @RETURN_VALUE VARCHAR(MAX)
IF @value LIKE '%[0-9]%[^A-Z]%[0-9]%'
BEGIN
SET @RETURN_VALUE = NULL
END
I am not sure, but whenever I have this in my row 12 TEST then it gives me the value of 12, but if I have three digit number then it filters out the three digit numbers.How can I modify the regular expression to return me the three digits numbers too.
any help will be appreciated.
Have you tried ([0-9]*). I believe that this will capture every digit for you. However, I am not as strong at regex. When I ran this through rubular, it worked, though 🙂 BTW, rubular is a great way to test out regular expressions