findByRegex method

Iterable<String> findByRegex(
  1. String pattern, {
  2. bool caseSensitive = true,
  3. bool multiLine = false,
})

Procura valores em uma string usando expressões regulares

Implementation

Iterable<String> findByRegex(String pattern, {bool caseSensitive = true, bool multiLine = false}) {
  RegExp regExp = RegExp(
    pattern,
    caseSensitive: caseSensitive,
    multiLine: multiLine,
  );

  return regExp.allMatches(this).map((match) => match.group(0)!).toList();
}