Chapter 4: Applications of Regular Expressions in SAS

4.1 Introduction

4.1.1 Random PII Generator

4.2 Data Cleansing and Standardization

4.3 Information Extraction

4.4 Search and Replacement

4.5 Summary

4.5.1 Start Small

4.5.2 Think Big

4.1 Introduction

In this chapter, we explore some real-world applications of RegEx with SAS, demonstrating a wide variety of scenarios in which we can implement what you have learned thus far. The general categories that these examples have been placed under do not to imply that we are limited in what we can do (see Chapter 1), nor do they imply a lack of overlap between some of the examples.

Now, in order to execute some of the applications to follow, we need a good source of addresses, phone numbers, names, ...

Get Introduction to Regular Expressions in SAS 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.