From 30d68751a341ffd0b4172a6b00b0d35457eb77d6 Mon Sep 17 00:00:00 2001 From: Jörg Sommrey <28217714+jo-37@users.noreply.github.com> Date: Mon, 8 Jun 2020 22:39:23 +0200 Subject: enhance solution for challenge 061-2 --- challenge-061/jo-37/perl/ch-2.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) mode change 100644 => 100755 challenge-061/jo-37/perl/ch-2.pl diff --git a/challenge-061/jo-37/perl/ch-2.pl b/challenge-061/jo-37/perl/ch-2.pl old mode 100644 new mode 100755 index 0f48e6c287..618d949e84 --- a/challenge-061/jo-37/perl/ch-2.pl +++ b/challenge-061/jo-37/perl/ch-2.pl @@ -22,7 +22,6 @@ use Test2::V0; # return an unmatchable pattern sub collect { push @result, [$1, $2, $3, $4] if pos == length; - '^'; # cannot match after address }; # Regex that never matches anything, but @@ -31,7 +30,8 @@ use Test2::V0; qr{ ^ $addr # match an address - (??{ collect }) # collect address and fail + (?{ collect }) # collect address + (*FAIL) # force backtracking }x; # prepare actual call and -- cgit