stringMatch method Null safety

String? stringMatch(
  1. String input
)

The substring of the first match of this regular expression in input.

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);