transform method

String transform(
  1. String input
)

Identifies the first match of regex in input and outputs new String as defined by the output template.

If input can't be matched by regex, input will be returned unmodified.

Implementation

String transform(String input) {
  final match = regex.firstMatch(input);
  if (match == null) return input;
  return _output.build(match);
}