Next: , Previous: , Up: Internal Routines   [Contents][Index]


15.5.490 regex

regex(string [, regex] [, /nocase])

[regex_h] Matches the string against the regular expression regex. If the text does not match, then 0 is returned. If the text does match, and if the regular expression does not contain parenthesized subexpressions, then the matched part of the text is returned. If the text does match and the regular expression contains parenthesized subexpressions, then a string array is returned with element 0 equal to the part of the text that matches the whole regular expression, and following elements equal to the parts of the text that match each next parenthesized subexpression (as defined by the opening parenthesis). If regex is not specified, then the regular expression that was specified most recently is used.