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!

Regular expression + Match whole word

YLNJun 5 2012 — edited Jun 5 2012
Hi All,

Please help me to know how to make sure REGEXP_COUNT match whole word and modify SQL statement.
I've a string comma separated like 'AB, CD, EF’

SQL: I am searching with ‘AB’
SELECT REGEXP_COUNT ('AB,CD,EF','AB',1,'i') from dual;--True
SELECT REGEXP_COUNT ('AB,CD,EF','A',1,'i') from dual;--False,should return 0
SELECT REGEXP_COUNT ('AB,CD,EF','BA',1,'i') from dual;--False,should return 0
Thanks,
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 3 2012
Added on Jun 5 2012
15 comments
2,755 views