findAll
findAll(text: String;
result: JadeRegexResult io): Integer;
The findAll method of the JadeRegexPattern class searches the entire specified text looking for all occurrences of the pattern. Any matches that are found are collated into a JadeRegexResult object.
The following method is an example of a findAll operation with a customized pattern.
findAllExample();
vars
pattern : JadeRegexPattern;
results : JadeRegexResult;
i, count : Integer;
begin
create pattern;
pattern.compile("\b[\w]{3,4}\b"); // find words of 3 to 4 characters long
pattern.findAll("the quick brown fox jumped over the lazy dog", results);
foreach i in 1 to results.numMatches do
write results.at(i).value;
endforeach;
/*writes:
the
fox
over
the
lazy
dog
*/
epilog
delete results;
delete pattern;
end;
This method returns the number of matches that are found, or it returns zero (0) if none are found.
2020.0.01 and higher
