exec function
RegEx
Implementation
List<String?>? exec(RegExp regex, String str) {
var m = regex.firstMatch(str);
if (m == null) {
return null;
}
var groups = <int>[];
for (var i = 0; i <= m.groupCount; i++) {
groups.add(i);
}
var retVal = m.groups(groups);
return retVal;
}