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 Step | DATA step |
Featured Step Options and Statements | Regular expressions and associated functions: PRXCHANGE, PRXMATCH, PRXPARSE, and PRXPOSN CATS function |
A Closer Look | Understanding 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 ...
Get Combining and Modifying SAS® Data Sets: Examples Second Edition 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.