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 for multiline data.

690792Apr 29 2010 — edited Apr 29 2010
Hi.
I have a problem.
I need to get a part of multiline string. e.g. everything between 'str_begin' and 'str_end'
If line is one it works fine:
SQL> select regexp_substr('asdfas str_begin fdfd str_end  fasdg','str_begin.*str_end') from dual;

REGEXP_SUBSTR('ASDFASS
----------------------
str_begin fdfd str_end
But if there two lines:
SQL> select regexp_substr('asdfas str_begin fdfd
                      str_end  fasdg','str_begin.*str_end') from dual;  

R
-
Is it possible to get everything between 'str_begin' and 'str_end' if these tags are in different lines?
This post has been answered by MichaelS on Apr 29 2010
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 27 2010
Added on Apr 29 2010
1 comment
2,015 views