Perl like regular expression in Oracle DB
- by user13136722
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')