Chapter Contents |
Previous |
Next |
CALL RXSUBSTR |
Category: | Character String Matching |
Restriction: | Use with the RXPARSE function |
Syntax | |
Arguments | |
Details | |
Comparisons | |
Example | |
See Also |
Syntax |
CALL RXSUBSTR (rx, string, position); |
CALL RXSUBSTR (rx, string, position, length); |
CALL RXSUBSTR (rx, string, position, length, score); |
Details |
CALL RXSUBSTR searches the variable string for the pattern from RXPARSE, returns the position of the start of the string, indicates the length of the matched string, and returns a score value. By default, when a pattern matches more than one substring beginning at a specific position, the longest substring is selected.
Comparisons |
CALL RXSUBSTR performs the same matching as RXMATCH, but CALL RXSUBSTR additionally allows you to use the length and score arguments to receive more information about the match.
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:
|
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.