Hi Guys, it's Xev.
I am using regexp_like and I have a search string that will find nine consecutive digits and nine digits with dashes in them.
Here is that string: '[0-9]{9}$|^[0-9]{3}-[0-9]{2}-[0-9]{4}$'
Now, I need to add to this string to tell it to find Alpha Numeric also....
I have seen regexp examples like this:
SELECT *
FROM test
WHERE REGEXP_LIKE(testcol, '[[:alnum:]]');
SELECT *
FROM test
WHERE REGEXP_LIKE(testcol, '[[:alnum:]]{3}');
SELECT *
FROM test
WHERE REGEXP_LIKE(testcol, '[[:alnum:]]{5}');
These examples above bring back things like "letters" (a-z) that has no numbers in them, they make the search to broad.
My question is how do I add the [[:alnum:]] to theĀ '[0-9]{9}$|^[0-9]{3}-[0-9]{2}-[0-9]{4}$' and it find different combinations of 12,13,9,8 and 6 Alpha Numeric numbers.
Thanks