extractDetections function

List<String> extractDetections(
  1. String text,
  2. RegExp regExp
)

Implementation

List<String> extractDetections(String text, RegExp regExp) {
  return regExp.allMatches(text).map((match) => match.group(0)!).toList();
}