Skip to Main Content

New to Java

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!

Oracle 9, how to find the first number within a string?

CalabNov 21 2022 — edited Nov 21 2022

Unfortunately, I'm stuck accessing an Oracle 9 database so don't have the luxury of using regex. The regex that I would expect to use is '([0-9]+)'.
How can I SELECT the first integer number from an alphanumeric column in Oracle 9? Commas decimal points and spaces should break a number.
'Port #123' should return '123'.
'123 456' should return '123'.
'6 on 4 should return '6'.
'Use 3.1415 for pi' should return '3'.
'Count 1,2,3' should return '1'
Apologies... I just realized that this is in 'New to Java'. I don't know how to move this message.

Comments
Post Details
Added on Nov 21 2022
0 comments
362 views