Scarlett72
asked on
Capture data between 2 characters
Hi I need to parse the content between the first and second '-' in a string, ie 012-09324-5418567 (Oracle 10g)
The following does work for me; however, I was also wondering if there is a more efficient way to do this or how to do it using regexp_instr:
Result: 09324
Thank you in advance for suggestions.
The following does work for me; however, I was also wondering if there is a more efficient way to do this or how to do it using regexp_instr:
SELECT SUBSTR('012-09324-541',INSTR('012-09324-541', '-')+1, INSTR('012-09324-541', '-' ,1,2)-INSTR('012-09324-541', '-')-1) FROM DUAL;
Result: 09324
Thank you in advance for suggestions.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.