home *** CD-ROM | disk | FTP | other *** search
- regexp ?-indices? ?-nocase? exp string ?matchVar? ?subMatchVar...?
- Determines whether the regular expression exp matches
- part or all of string and returns 1 if it does, 0 if it
- doesn't. See REGULAR EXPRESSIONS above for complete
- information on the syntax of exp and how it is matched
- against string.
- If the -nocase switch is specified then upper-case
- characters in string are treated as lower case during
- the matching process. The -nocase switch must be
- specified before exp and may not be abbreviated.
-
- If additional arguments are specified after string then
- they are treated as the names of variables to use to
- return information about which part(s) of string
- matched exp. MatchVar will be set to the range of
- string that matched all of exp. The first subMatchVar
- will contain the characters in string that matched the
- leftmost parenthesized subexpression within exp, the
- next subMatchVar will contain the characters that
- matched the next parenthesized subexpression to the
- right in exp, and so on.
-
- Normally, matchVar and the subMatchVars are set to hold
- the matching characters from string. However, if the
- -indices switch is specified then each variable will
- contain a list of two decimal strings giving the
- indices in string of the first and last characters in
- the matching range of characters. The -indices switch
- must be specified before the exp argument and may not
- be abbreviated.
-
- If there are more more subMatchVar's than parenthesized
- subexpressions within exp, or if a particular
- subexpression in exp doesn't match the string (e.g.
- because it was in a portion of the expression that
- wasn't matched), then the corresponding subMatchVar
- will be set to ``-1 -1'' if -indices has been specified
- or to an empty string otherwise.
-