I skimmed thru https://www.postgresql.org/docs/14/functions-matching.html and found some features which were new to me.
E.g. I've never heard of metacharacters \m or \M (?) I tested them and Perl will only see the escaped characters, i.e. literal m and M .
> It would be ideal if Perl 5.6 were a superset of Posix.
I'm afraid Postgres has another incompatible superset of Posix
Further searching revealed that PG is apparently using the TCL RE-engine and
> There are a number of important differences between Tcl Advanced Regular Expressions and Perl-style regular expressions. Tcl uses \m, \M, \y and \Y for word boundaries. Perl and most other modern regex flavors use \b and \B. In Tcl, these last two match a backspace and a backslash, respectively.
see here for more:
good luck with that using Perl tools. :|I think you will be better off using something from the TCL toolchain.
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
In reply to Re: Posix regexes in Perl (Tcl Advanced Regular Expressions)
by LanX
in thread Posix regexes in Perl
by davies
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |