getMatches static method
Return the list of input matches the regex (all non-overlapping match strings, i.e. group 0 of each match). 返回输入中匹配正则的全部子串列表(非重叠、取整段匹配)。
Implementation
static List<String> getMatches(String regex, String input) {
return RegExp(regex)
.allMatches(input)
.map((Match match) => match.group(0)!)
.toList();
}