Subject: | Regexp with anchors fails to match |
I can't seem to use regex anchors to force the match to the start or end
of a string. For example:
throws_ok {die "foo"} qr/^foo$/, "Throws with regex anchors";
not ok 1 - Throws with regex anchors
# Failed test 'Throws with regex anchors'
# at CountryCodes.t line 9.
# expecting: Regexp ((?-xism:^foo$))
# found: foo at CountryCodes.t line 9.
This passes:
throws_ok {die "foo"} qr/foo/, "Throws with regex anchors";