Example 9.19 Validating and Standardizing Complex Character Data
Validate character data values that can be stored in multiple patterns. When valid, reformat values to conform to one pattern.
|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 email@example.com 2 Denise M. Morris (607)555-0123 ...