diff options
| -rw-r--r-- | challenge-099/ulrich-rieke/perl/ch-2.pl | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/challenge-099/ulrich-rieke/perl/ch-2.pl b/challenge-099/ulrich-rieke/perl/ch-2.pl index 7c3e9e1345..65955fc955 100644 --- a/challenge-099/ulrich-rieke/perl/ch-2.pl +++ b/challenge-099/ulrich-rieke/perl/ch-2.pl @@ -40,7 +40,8 @@ sub findSubstrings { push @startpositions, pos $longword ; } #we look for the rest of the chunks from every position in @startpositions - $regex = "\.\+\?" ; #at least one character after the first chunk, greedily + $regex = "\.\+\?" ; #at least one character after the first chunk, + #non-greedily for my $i (1 .. $len - 1 ) { $regex .= "$chunks->[ $i ]" ; if ( $i != $len - 1 ) { |
