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 ...

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.