I need to extract patterned numbers from I/P string. I have the following patterns:
xxx-xxx-xxxx
xxx xxx-xxxx
xxx  xxx  xxxx
I am using this query to find matching string:
select REGEXP_substr('phn: 678 987-0987 Date: 12/2029',
                 '[0-9]{3}(\-|\  |\ )[0-9]{3}(\-|\--|\ )[0-9]{4}')
from dual;
I also want to extract the following patterns:
xxxxxx-xxxx
xxxxxxxxxx
etc...
Where do I modify the query?
 
     
     
    