extractInnerTextWithRegex static method

String extractInnerTextWithRegex(
  1. String htmlString
)

Implementation

static String extractInnerTextWithRegex(String htmlString) {
  final regex = RegExp(r'>([^<>]+)<');
  final match = regex.firstMatch(htmlString);
  return match != null ? match.group(1)?.trim() ?? '' : '';
}