O'Reilly logo

Combining and Modifying SAS® Data Sets: Examples Second Edition by Michele M. Burlew

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Example 9.19 Validating and Standardizing Complex Character Data

Goal

Validate character data values that can be stored in multiple patterns. When valid, reformat values to conform to one pattern.

Example Features

Featured StepDATA step
Featured Step Options and StatementsRegular expressions and associated functions: PRXCHANGE, PRXMATCH, PRXPARSE, and PRXPOSN CATS function
A Closer LookUnderstanding the Regular Expressions Defined in This Example

Input Data Sets

Data set NEWCONTACTS contains contact information about eight people. The values for each variable are not uniformly specified.

                                NEWCONTACTS

 Obs     contactname       contactphone   contactemail 1 Young Wilson, Karen (315) 555- 3210 karen.young.wilson@big-agency.gov 2 Denise M. Morris (607)555-0123 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required