RegExpExtensions extension
Shortcuts for the most common RegExp jobs.
final number = RegExp(r'\d+');
number.find('order 66 of 99'); // '66'
number.findAll('order 66 of 99'); // ['66', '99']
number.matchesWhole('123'); // true
number.matchesWhole('123abc'); // false
- on
Methods
-
countIn(
String input) → int -
Available on RegExp, provided by the RegExpExtensions extension
How many times this matches ininput. -
find(
String input) → String? -
Available on RegExp, provided by the RegExpExtensions extension
The first matching text ininput, or null if nothing matches. -
findAll(
String input) → List< String> -
Available on RegExp, provided by the RegExpExtensions extension
Every matching text ininput. -
matchesWhole(
String input) → bool -
Available on RegExp, provided by the RegExpExtensions extension
Whether the whole ofinputmatches, not just part of it.