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