I have a few reg expressions that work on dart but this one for some reason always returns false. I'm trying to validate an ID, code below
if (RegExp(r'/^[0-9]{3}-[0-9]{4}-[0-9]{7}-[0-9]{1}$/').hasMatch('123-1234-1234567-1')) {
debugPrint('ID valid');
} else {
debugPrint('Invalid');
}