mnemo_cards/test_regex.dart

7 lines
304 B
Dart
Raw Normal View History

2025-11-10 23:55:41 +00:00
void main() {
final regex = RegExp(r'^/packs/\d+/tests');
print('Regex matches /packs/10/tests: ${regex.hasMatch('/packs/10/tests')}');
print('Regex matches /packs/123/tests: ${regex.hasMatch('/packs/123/tests')}');
print('Regex matches /packs/10/cards: ${regex.hasMatch('/packs/10/cards')}');
}