mangayomi/lib/utils/reg_exp_matcher.dart
kodjodevf d6dec733a7 *fix
2023-04-11 17:38:40 +01:00

13 lines
No EOL
402 B
Dart

String regHrefMatcher(String input) {
RegExp exp = RegExp(r'href="([^"]+)"');
Iterable<Match> matches = exp.allMatches(input);
String? firstMatch = matches.first.group(1);
return firstMatch!;
}
String regSrcMatcher(String input) {
RegExp exp = RegExp(r'src="([^"]+)"');
Iterable<Match> matches = exp.allMatches(input);
String? firstMatch = matches.first.group(1);
return firstMatch!;
}