firstMatch method
Finds the first match of the regular expression in the string input
.
Returns null
if there is no match.
final string = '[00:13.37] This is a chat message.';
final regExp = RegExp(r'c\w*');
final match = regExp.firstMatch(string)!;
print(match[0]); // chat
Implementation
@override
RegExpMatch? firstMatch(String input) {
return _regExp.firstMatch(input);
}