Pass the Perl regular expression to PRXPARSE and compile the expression. Using the value with other Perl regular expression functions and CALL routines enables SAS to perform operations with the compiled Perl regular expression.
Use the PRXPAREN function to determine which submatch to use.
If you have any questions, just leave a note in the Comments section, and I'll get back with you.
For example, you can examine a string to determine whether it contains a correctly formatted telephone number. putlog "NOTE: Invalid business phone number for " first last business; datalines; Jerome Johnson (919)319-1677 (919)846-2198 Romeo Montague 800-899-2164 360-973-6201 Imani Rashid (508)852-2146 (508)366-9821 Palinor Kent . Spaces are significant in Perl regular expressions.I'm going to keep this short for today, but if you're very new to sorting in Perl, there are a few more things I should mention here: operator to perform the string comparison.I know I've skipped some other things here, but I'm guessing that most people just want that Perl integer array sorting algorithm, so I'm going to stop here for today.(This 'helper function' approach is very similar to other languages, like Java, where you provide helper functions like this to help generic sort algorithms sort your lists or arrays.) Here's a short script that demonstrates how to sort a Perl integer array: , though by now I've probably seen it in hundreds of Perl scripts.There are longer ways to write this code that might make the code more readable, but I've skipped all of those and gone straight to this solution, which I have seen most-commonly used.