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 from the SAS Web site in a
ZIP file (updated March 2008).
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
http://www.perl.com.
Only Perl regular expressions are accessable 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:
- 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. This 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.
Your Turn
The developers, testers and documentation folk that bring you Base SAS
software are very excited about the potential of these new capabilities of
the SAS System. You can send electronic mail to
Base.Research@sas.com with your
comments.