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

pcrePrintLastMatchErr

pcrePrintLastMatchErr( 
o_patMatchObj 
) 
=> t / nil

Description

Prints the error message associated with the last failed matching operation (that is, when pcreExecute returns nil).

Argument

o_patMatchObj

Data object containing information from a previously failed pattern comilation/matching operation.

Value Returned

t

Prints the error message associated with the last failed matching operation and returns t.

nil

No previously failed matching operation.

Examples

comPat = pcreCompile( "[0-9]*[.][0-9]+" ) 
=> pcreobj@0x27d060
pcreExecute( comPat "123" )
=> nil
pcrePrintLastMatchErr( comPat )
=> The subject string did not match the compiled pattern.
pcreExecute( comPat "123" pcreGenCompileOptBits(?caseLess t) ) 
=> nil
pcrePrintLastMatchErr( comPat )
=> An unrecognized bit was set in the options argument.

Related Topics

String Functions

pcreCompile

pcreExecute

pcreGenCompileOptBits

pcreGenExecOptBits


Return to top
 ⠀
X