In reply to Tom Sabo.

Thank you, Tom, for your comment. Yes, the same can be achieved by using PRX functions (PRXMATCH, PRXCHANGE, PRXPARSE, etc.) that enable Perl regular expressions (regex) in SAS. However, from my experience using native SAS functions provides considerably faster performance than using regex which is essential when processing large data; see Using Perl regular expression section in my earlier post.