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_SUBSTR Return null if pattern doesn't match

user13444930Mar 15 2016 — edited Mar 15 2016

I'm trying to get the String after the delimiter(,) ,if we don't have a delimiter it should return null

Can you guys please help me with this.

This is what I'm doing right now:

select  REGEXP_SUBSTR('First String, Second String','[^,]*$') from dual

   Expected Output : Second String (This is working)

select  REGEXP_SUBSTR('First String Second String','[^,]*$') from dual

   Expected Output : NULL OR NO VALUE (This is not working)

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 12 2016
Added on Mar 15 2016
9 comments
2,247 views