Perl Artistic License Compliance

Perl regular expressions are supported beginning with SAS® 9.
The PRX functions use a modified version of Perl 5.6.1 to perform regular expression compilation and matching. Perl is compiled into a library for use with SAS. This library is shipped with SAS® 9. The modified and original Perl 5.6.1 files are freely available in a ZIP file from the Technical Support Web site. The ZIP file is provided to comply with the Perl Artistic License and is not required in order to use the PRX functions. Each of the modified files has a comment block at the top of the file describing how and when the file was changed. The executables were given nonstandard Perl names. The standard version of Perl can be obtained from the Perl Web site.
Only Perl regular expressions are accessible from the PRX functions. Other parts of the Perl language are not accessible. The modified version of Perl regular expressions does not support the following items:
  • Perl variables (except the capture buffer variables $1 - $n, which are supported).
  • The regular expression options /c and /g, and the /e option with substitutions.
  • The regular expression option /o in SAS 9.0. (It is supported in SAS 9.1 and later.)
  • Named characters, which use the \N{name} syntax.
  • The metacharacters \pP, \PP, and \X.
  • Executing Perl code within a regular expression, which includes the syntax (?{code}), (??{code}), and (?p{code}).
  • Unicode pattern matching.
  • Using ?PATTERN?. ? is treated like an ordinary regular expression start and end delimiter.
  • The metacharacter \G.
  • Perl comments between a pattern and replacement text. For example: s{regexp} # perl comment {replacement} is not supported.
  • Matching backslashes with m/\\\\/. Instead use m/\\/ to match a backslash.