Does PostgreSQL support \\b?
I\'m trying \\bAB\\b but it doesn\'t match anything, whereas (\\W|^)AB(\\W|$) does. These 2 expre
A simple example
select * from table_name where column ~* '\yAB\y';
This will match AB
ab
ab - text
text ab
text AB
text-ab-text
text AB text ...
But you have to use:
select * from sometable where name ~* '\\yAB\\y';
in case you have standard_conforming_strings flag
set to OFF. Note the double slashes.
You can set it manually :
set standard_conforming_strings=on;
Then :select * from table_name where column ~* '\yAB\y'; should work.