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!

Ignoring whitespace in regular expression

715920Apr 25 2011 — edited Apr 25 2011
Dear all,
could anyone advice me how Oracle evaluate the following query:
SQL> select regexp_substr('Baba black','b[a-z]+ [a-z]+',1,1,'x') from dual;

REGEX
-----
black
I thought it would return 'ba', but instead it returns 'black'. How come 'ba' in the first word isn't detected by the pattern?

Best regards,
Val
This post has been answered by Frank Kulash on Apr 25 2011
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 23 2011
Added on Apr 25 2011
5 comments
896 views