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

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

S_target

String or symbol to be matched. If a symbol is given, its print name is used.

Value Returned

t

A match is found.

nil

A match is not found.

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

String Functions

rexCompile

rexMatchp

rexSubstitute

pcreCompile


Return to top
 ⠀
X