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_LIKE AND operator

GrailsDeveloperMay 25 2012 — edited May 25 2012
Hi,

I am trying to user REGEXP_LIKE for

String: foo,bar,baz

To return only string containing foo AND bar in any order.

If the search is based on FOO

the result should be --> foo

If the search is based o FOO and BAR or FO and BA I should get that string

I know there

(?=.*foo)(?=.*baz) This says that foo must appear anywhere and bar must appear anywhere, not necessarily in that order and possibly overlapping.

Specifically, I'm wanting to match paragraphs of text that contain ALL of a certain phrase, but in no particular order.


What is the right syntax using Oracle REGEXP_LIKE


Thanks,

Michael
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 22 2012
Added on May 25 2012
4 comments
1,617 views