Chapter 27: Introducing Perl Regular Expressions

27.1  Introduction

27.2  Describing the Syntax of Regular Expressions

27.3  Testing That Social Security Numbers Are in Standard Form

27.4  Checking for Valid ZIP Codes

27.5  Verifying That Phone Numbers Are in a Standard Form

27.6  Describing the PRXPARSE Function

27.7  Problems

 

27.1 Introduction

Regular expressions were first introduced in a language called Perl, developed for UNIX and Linux systems. Perl regular expressions were added to SAS starting with SAS 9. They are used to describe text patterns. For example, you can write an expression that matches any Social Security number (three digits, a dash, two digits, a dash, and four digits). Therefore, you can use a regular expression to ...

Get Learning SAS by Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.