Specifically, I'm using the Linux command:
$ find . -regextype posix-extended -regex '<some regex>' ...
I just want to make sure the POSIX type I'm using is the type Perl uses, since that is by far the one I am most familiar with.
Specifically, I'm using the Linux command:
$ find . -regextype posix-extended -regex '<some regex>' ...
I just want to make sure the POSIX type I'm using is the type Perl uses, since that is by far the one I am most familiar with.
Perl's regular expression engine is Perl's regular expression engine. perl
defines Perl.
For details, see perldoc perlreref.
Perl uses Perl regular expressions, not POSIX ones. You can compare the syntaxes yourself, for example in regex(7)
.
Perl has defined its own standard for regexes. E.g., there are systems such as PCRE, which stands for Perl Compatible Regular Expressions.
Perl's regexes are more like the Posix extended ones. Basic posix regular expressions use (
and {
to match the actual characters, and \(
and \{
as special characters, but the Posix extended ones use (
and {
for the same meaning as in Perl and \(
or \{
to match the actual characters, the same as Perl. So posix-extended is what you want.
Per perldoc perlhist, Perl 0 ("Classified. Don't ask.") used basic regular expressions. All versions since, starting with Perl 1.000 in December of '87, have used extended regular expressions (and extended on those...).