stringMatch abstract method
- String input
Finds the string of the first match of this regular expression in input.
Searches for a match for this regular expression in input, just like firstMatch, but returns only the matched substring if a match is found, not a RegExpMatch.
var string = 'Dash is a bird'; var regExp = RegExp(r'(humming)?bird'); var match = regExp.stringMatch(string); // Match regExp = RegExp(r'dog'); match = regExp.stringMatch(string); // No match
Implementation
String? stringMatch(String input);
© 2012 the Dart project authors
Licensed under the BSD 3-Clause "New" or "Revised" License.
https://api.dart.dev/stable/2.19.6/dart-core/RegExp/stringMatch.html