rexMatchList
rexMatchList(t_patternl_targets) =>l_results/nil
Description
Creates a new list of those strings or symbols in the given list that match a regular expression pattern. The supplied regular expression pattern overwrites the previously compiled pattern and is used for subsequent matching until the next new pattern is provided.
Arguments
|
List of strings and/or symbols to be matched against the pattern. |
Value Returned
|
List of strings (or symbols) that are on l_targets and found to match t_pattern. |
|
|
If no match is found. Signals an error if the given pattern is ill-formed. |
Examples
rexMatchList("^[a-z][0-9]*" '(a01 x02 "003" aa01 "abc"))
=> (a01 x02 aa01 "abc")
rexMatchList("^[a-z][0-9][0-9]*"
'(a001 b002 "003" aa01 "abc"))
=> (a001 b002)
rexMatchList("box[0-9]*" '(square circle "cell9" "123"))
=> nil
Related Topics
Return to top