klyn.regex.RegEx.findAll
method
public findAll(input as String) as Array<MatchResult> throws RegExException
Description

Finds all occurrences of the pattern in the input. Empty matches occur only at Unicode character boundaries.

Parameters
ParameterDescription
inputThe string to search.
Returns

An array containing all found occurrences.

Throws
  • RegExException if the regular expression cannot be evaluated.
Example
regex = RegEx("\\d+")
results = regex.findAll("123 abc 456")
print(results[0].value)    # 123
print(results[1].value)    # 456