Product Documentation
Cadence SKILL Language Reference
Product Version IC23.1, November 2023

rexMatchList

rexMatchList( 
t_pattern 
l_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

t_pattern

Regular expression pattern.

l_targets

List of strings and/or symbols to be matched against the pattern.

Value Returned

l_results

List of strings (or symbols) that are on l_targets and found to match t_pattern.

nil

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

String Functions

rexCompile

rexMatchp

rexExecute

rexMatchAssocList


Return to top
 ⠀
X