RXMATCH Function


Finds the beginning of a substring that matches a pattern

Category: Character String Matching

Restriction: Use with the RXPARSE function

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 'Examples' on page 811.

See Also

Functions and CALL routines:

  • 'CALL RXCHANGE Routine' on page 385

    'CALL RXFREE Routine' on page 387

    'RXPARSE Function' on page 800

    'CALL RXSUBSTR Routine' on page 388




SAS 9.1 Language Reference Dictionary, Volumes 1, 2 and 3
SAS 9.1 Language Reference Dictionary, Volumes 1, 2 and 3
ISBN: N/A
EAN: N/A
Year: 2004
Pages: 704

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net