What POSIX regular expression flavor does Perl use?

In particular, I use the Linux command:

  $ find.  -regextype posix-extended -regex '<some regex>' ... 

I just want to make sure that the POSIX type that I use is the type used by Perl, since it is by far the one I am most familiar with.

+6
linux regex posix find perl
source share
5 answers

Perl controllers are more like extended Posix controls. In regular regular expressions, posix is ​​used ( and { to match the actual characters and \( and \{ as special characters, but extended Posix uses ( and { for the same meaning as in Perl and \( or \{ to match the actual characters like Perl, so posix-extended is what you want.

+1
source share

Perl has defined its own standard for regular expressions. For example, there are systems like PCRE , which means Perl compatible regular expressions.

+9
source share

Perl's regex engine is a Perl regex engine. perl defines Perl.

See perldoc perlreref for details .

+8
source share

Perl uses Perl regular expressions, not POSIX. You can compare the syntaxes yourself, for example, in regex(7) .

+5
source share

Per perldoc perlhist , Perl 0 ("Classify don't ask") used basic regular expressions. All versions since then, since Perl 1.000 in December 1987, have used extended regular expressions (and extended to those ...).

+4
source share

All Articles