rexExecute
rexExecute(S_target) =>t / nil
Description
Matches a string or symbol against the previously compiled pattern set up by the last rexCompile call.
This function is used in conjunction with rexCompile for matching multiple targets against a single pattern.
Calls to
rexMatchp reset the pattern set up by rexCompile. If any calls to rexMatchP have been made, rexExecute will not match the pattern set by rexCompile.Arguments
|
String or symbol to be matched. If a symbol is given, its print name is used. |
Value Returned
Examples
rexCompile("^[a-zA-Z][a-zA-Z0-9]*")
=> t
rexExecute('Cell123)
=> t
rexExecute("123 cells")
=> nil
Target does not begin with a-z/A-Z
rexCompile("\\([a-z]+\\)\\.\\1")
=> t
rexExecute("abc.bc")
=> t
rexExecute("abc.ab")
=> nil
Related Topics
Return to top