Hi all. I'm trying to create a REGEXP pattern that will check if a string contains a set of numbers separated by a space. I have tried the 4 statements below. They all return 0. What am I doing wrong? Thanks.
Code:SELECT '0630 3062' REGEXP '^[0-9]{4} [[:space:]] [0-9]{4}$';Code:SELECT 'Employee 346 retrad: 0630 3062' REGEXP '[0-9]{4} [[:space:]] [0-9]{4}';Code:SELECT 'Employee 346 retrad: 0630 3062' REGEXP '[0-9]+ [[:space:]] [0-9]+';Code:SELECT 'Employee 346 retrad: 0630 3062 1657 in July Assessment' REGEXP '[0-9]+ [[:space:]] [0-9]+';
The statements are also in this db fiddle
Thanks.




Reply With Quote
