Method RegEx():count() Foundation
Counts all matches.
:count( <cSubject> ) --> nCount
The number of matches found.
Returns the total number of non-overlapping matches of the pattern in the subject string. This method scans the entire string and counts all occurrences.
Count
oRegEx := RegEx():create("\b\w+\b") // Word pattern
nWords := oRegEx:count("The quick brown fox")
? nWords // 4
oRegEx:destroy()
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.