aboutsummaryrefslogtreecommitdiff
path: root/challenge-061/jo-37
diff options
context:
space:
mode:
authorJörg Sommrey <28217714+jo-37@users.noreply.github.com>2020-06-08 22:39:23 +0200
committerJörg Sommrey <28217714+jo-37@users.noreply.github.com>2020-06-08 22:44:51 +0200
commit30d68751a341ffd0b4172a6b00b0d35457eb77d6 (patch)
treeda4fd9967dc76889a6fce33e0706ab4341a01a3f /challenge-061/jo-37
parentb5b7ec8a3b815c77b14a2e14882cb81b02a879c6 (diff)
downloadperlweeklychallenge-club-30d68751a341ffd0b4172a6b00b0d35457eb77d6.tar.gz
perlweeklychallenge-club-30d68751a341ffd0b4172a6b00b0d35457eb77d6.tar.bz2
perlweeklychallenge-club-30d68751a341ffd0b4172a6b00b0d35457eb77d6.zip
enhance solution for challenge 061-2
Diffstat (limited to 'challenge-061/jo-37')
-rwxr-xr-x[-rw-r--r--]challenge-061/jo-37/perl/ch-2.pl4
1 files changed, 2 insertions, 2 deletions
diff --git a/challenge-061/jo-37/perl/ch-2.pl b/challenge-061/jo-37/perl/ch-2.pl
index 0f48e6c287..618d949e84 100644..100755
--- 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