Chapter Contents

Previous

Next
RXMATCH

RXMATCH



Finds the beginning of a substring that matches a pattern and returns a value

Category: Character String Matching
Restriction: Use with the RXPARSE function


Syntax
Arguments
Details
Comparisons
Example
See Also

Syntax

position=RXMATCH (rx, string)

Arguments

position
specifies a numeric position in a string where the substring that is matched by the pattern begins. If there is no match, the result is zero.

rx
specifies a numeric value that is returned from the RXPARSE function.

string
specifies the character expression to be searched.


Details

RXMATCH searches the variable string for the pattern from RXPARSE and returns the position of the start of the string.


Comparisons

The regular expression (RX) functions and CALL routines work together to manipulate strings that match patterns. Use the RXPARSE function to parse a pattern you specify. Use the RXMATCH function and the CALL RXCHANGE and CALL RXSUBSTR routines to match or modify your data. Use the CALL RXFREE routine to free allocated space.


Example

See the RXPARSE function Example.

See Also

Functions and CALL routines:

CALL RXCHANGE
CALL RXFREE
RXPARSE
CALL RXSUBSTR


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.