O'Reilly logo

SAS Functions by Example, Second Edition, 2nd Edition by Ron Cody

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

Functions That Locate Text Patterns

Function:   PRXMATCH

Purpose:    To locate the position in a string where a regular expression match is found. PRXMATCH returns the starting position at which the pattern is found. If this pattern is not found, the function returns a 0. (This function is similar to the FIND function, but instead of matching a string of characters, it is matching a pattern described by a regular expression.)

Syntax:      PRXMATCH(pattern-id or regular-expression, string)

pattern-id is the value returned from the PRXPARSE function.

regular-expression is a Perl regular expression, placed in quotation marks (SAS 9.1 and later). Note: If you use pattern-id, you must use the PRXPARSE function first. If you place the regular expression ...

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