Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

REGEXP_SUBSTR get number

Peter_TonJan 29 2012 — edited Jan 29 2012
Hello,

I want to extract a number from a string that is always at the same position. The string looks e.g. like 'lkjsd.d.23.doc33-i-99.doc'. I want to get the number which is always before '.doc'. I know I could do that with a regexp_substring [[:digit:]]+.doc$ (with $ I know its at the end of the string) and I get '99.doc' and put the result into another regexp_substring [[:digit:]]+ with that I get '99'.
Could I do that with one regexp_substring expression? How could I pimp that?

thx
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 26 2012
Added on Jan 29 2012
7 comments
5,358 views