Using Perl regular
expressions in the DATA step enhances search-and-replace options in
text. You can use Perl regular expressions to perform the following
tasks:
-
-
-
extract a substring from a string
You can write SAS programs
that do not use regular expressions to produce the same results as
you do when you use Perl regular expressions. However, the code without
the regular expressions requires more function calls to handle character
positions in a string and to manipulate parts of the string.
Perl regular expressions
combine most, if not all, of these steps into one expression. The
resulting code is less prone to error, easier to maintain, and clearer
to read.