count-matches ( string regexp -- n )
Regular expressions ยป Matching operations with regular expressions

Prev:first-match ( string regexp -- slice/f )
Next:all-matching-slices ( string regexp -- seq )


Vocabulary
regexp

Inputs
stringa string
regexpa regexp


Outputs
nan integer


Word description
Counts how many disjoint matches the regexp has in the string, as made unambiguous by all-matching-slices.

Definition