FAQ
Hi All,

what regular expression would you suggest to get all ORA- errors (with from
1 to 5 numbers)
out of some text like this:

' ORA-00001 ora-0002 ora ora-003 aasdlkja alksdj alksdj laskdj
ORA-04 aaaa a a a aora-5 '

I am trying to figure out how to use
regexp_replace to replace all characters around ora-... errors to get
output:

'ORA-00001 ora-0002 ora-003 ORA-04 ora-5'

but can't find appropriate expression so far:

with s1 as (select ' ORA-00001 ora-0002 ora ora-003 aasdlkja
alksdj alksdj laskdj ORA-04 aaaa a a a aora-5 ' s from dual)
select regexp_replace(s, *'...'*, '...', 1, 0, 'i') from s1
/

Search Discussions

Discussion Posts

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 2 | next ›
Discussion Overview
grouporacle-l @
categoriesoracle
postedFeb 15, '09 at 3:34a
activeFeb 18, '09 at 1:33p
posts2
users2
websiteoracle.com

People

Translate

site design / logo © 2022 Grokbase