Hacker News new | ask | show | jobs
by peterwwillis 4494 days ago
http://perldoc.perl.org/perlre.html#PCRE/Python-Support

  PCRE/Python Support
  
  As of Perl 5.10.0, Perl supports several Python/PCRE-specific extensions to the
  regex syntax. While Perl programmers are encouraged to use the Perl-specific
  syntax, the following are also accepted:
  
      (?P<NAME>pattern)
      Define a named capture group. Equivalent to (?<NAME>pattern).
  
      (?P=NAME)
      Backreference to a named capture group. Equivalent to \g{NAME} .
  
      (?P>NAME)
      Subroutine call to a named capture group. Equivalent to (?&NAME).