Chapter 2

Perl Regular Expressions

 

Introduction

A Brief Tutorial on Perl Regular Expressions

Function That Defines a Regular Expression

PRXPARSE

Functions That Locate Text Patterns

PRXMATCH

CALL PRXSUBSTR

CALL PRXPOSN

CALL PRXNEXT

PRXPAREN

Function That Substitutes One String for Another

CALL PRXCHANGE

Function That Releases Memory Used by a Regular Expression

CALL PRXFREE

 

Introduction

Perl regular expressions were added in SAS®9. SAS regular expressions (similar to Perl regular expressions but using a different syntax to indicate text patterns) have actually been around since SAS 6.12, but many SAS users are unfamiliar with either SAS or Perl regular expressions. Both SAS regular expressions (the RX functions) and Perl regular expressions ...

Get SAS Functions by Example, Second Edition, 2nd 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.