Perl like regular expression in Oracle DB

Posted by user13136722 on Oracle Blogs See other posts from Oracle Blogs or by user13136722
Published on Wed, 20 Jun 2012 10:58:42 +0000 Indexed on 2012/06/20 15:22 UTC
Read the original article Hit count: 235

Filed under:
There's regular expression support in Oracle DB

Using Regular Expressions in Database Applications
Oracle SQL PERL-Influenced Extensions to POSIX Standard
But '\b' is not supported which I believe is quite wideliy used in perl and/or other tools

perlre - perldoc.perl.org
\b Match a word boundary
So, I experimented with '\W' which is non-"word" character
When combined with beginning-of-line and end-of-line like below, I think it works exactly the same as '\b'
SELECT * FROM TAB1 WHERE regexp_like(TEXTCOL1, '(^|\W)a_word($|\W)', 'i')




© Oracle Blogs or respective owner

Related posts about /Misc