#my $re = qr{(?x: (?## 1..10 ok 1 - Testing: 12 ok 2 - Testing: 123 ok 3 - Testing: 1234 ok 4 - Testing: 12345 ok 5 - Testing: 123 4567 890 ok 6 - Testing: 123 4567 89 not ok 7 - Testing: 123-4567-890 # Failed test 'Testing: 123-4567-890' # at ./pm_1178784_regex_digits.pl line 29. # got: '>123<>123<->4567<>4567<->890<>890<' # expected: '123-4567-890' not ok 8 - Testing: 01/02/2017 # Failed test 'Testing: 01/02/2017' # at ./pm_1178784_regex_digits.pl line 29. # got: '01/02/>2017<>2017<' # expected: '01/02/2017' not ok 9 - Testing: 2017-01-02T17:01:34 # Failed test 'Testing: 2017-01-02T17:01:34' # at ./pm_1178784_regex_digits.pl line 29. # got: '>2017<>2017<-01-02T17:01:34' # expected: '2017-01-02T17:01:34' ok 10 - Testing: 12 # 345 # 6789 # 0 # Looks like you failed 3 tests of 10.