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

pcreSubpatCount

pcreSubpatCount( 
o_pcreObj
) 
=> x_count

Description

Counts the subpatterns in a PCRE pattern.

Argument

o_pcreObj

A PCRE compile object, produced by the pcreCompile function.

Value Returned

x_count

The number of subpatterns in a PCRE pattern. If there are no subpatterns in the PCRE pattern, it returns 0. x_count is a fixnum value.

Examples

p1 = pcreCompile("(a)(b)(c)(d)") ;compile a pcre with 4 subpatterns
pcreSubpatCount(p1)
=> 4

Related Topics

String Functions

substring


Return to top
 ⠀
X