allMatches method

Iterable<RegExpMatch> allMatches (
  1. String input,
  2. [int start = 0]
)
override

Matches this pattern against the string repeatedly.

If start is provided, matching will start at that index.

The returned iterable lazily finds non-overlapping matches of the pattern in the string. If a user only requests the first match, this function should not compute all possible matches.

The matches are found by repeatedly finding the first match of the pattern in the string, initially starting from start, and then from the end of the previous match (but always at least one position later than the start of the previous match, in case the patter matches an empty substring).

Implementation

Iterable<RegExpMatch> allMatches(String input, [int start = 0]);

© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dart.dev/stable/2.13.0/dart-core/RegExp/allMatches.html