diff options
| author | Mohammad Sajid Anwar <Mohammad.Anwar@yahoo.com> | 2024-08-11 17:32:44 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-08-11 17:32:44 +0100 |
| commit | 2c8729cbf4652b4cc4631cfc1d7965a7058bb6d5 (patch) | |
| tree | fb1626fed500e39627cc454fc867d3812b116d39 | |
| parent | 7ea1b2a079f9c50e11d1385c04749a0f60783c92 (diff) | |
| parent | 4c80e0ff6334dc4049c40bf0182c7b5f93144212 (diff) | |
| download | perlweeklychallenge-club-2c8729cbf4652b4cc4631cfc1d7965a7058bb6d5.tar.gz perlweeklychallenge-club-2c8729cbf4652b4cc4631cfc1d7965a7058bb6d5.tar.bz2 perlweeklychallenge-club-2c8729cbf4652b4cc4631cfc1d7965a7058bb6d5.zip | |
Merge pull request #10581 from adamcrussell/challenge-281
minor fix to regex
| -rw-r--r-- | challenge-281/adam-russell/perl/ch-2.pl | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/challenge-281/adam-russell/perl/ch-2.pl b/challenge-281/adam-russell/perl/ch-2.pl index a31a0146b8..60a0dfbd64 100644 --- a/challenge-281/adam-russell/perl/ch-2.pl +++ b/challenge-281/adam-russell/perl/ch-2.pl @@ -19,13 +19,13 @@ sub build_graph{ $graph->add_edge(qq/$c$r/, qq/$t$s/) if $s >= 1 && $s <= 8 && - $t =~ m/[a-z]/; + $t =~ m/[a-h]/; $t = chr(ord(qq/$c/) + 1); $graph->add_edge(qq/$c$r/, qq/$t$s/) if $s >= 1 && $s <= 8 && - $t =~ m/[a-z]/; + $t =~ m/[a-h]/; ## # down @@ -35,13 +35,13 @@ sub build_graph{ $graph->add_edge(qq/$c$r/, qq/$t$s/) if $s >= 1 && $s <= 8 && - $t =~ m/[a-z]/; + $t =~ m/[a-h]/; $t = chr(ord(qq/$c/) + 1); $graph->add_edge(qq/$c$r/, qq/$t$s/) if $s >= 1 && $s <= 8 && - $t =~ m/[a-z]/; + $t =~ m/[a-h]/; ## # left @@ -51,13 +51,13 @@ sub build_graph{ $graph->add_edge(qq/$c$r/, qq/$t$s/) if $s >= 1 && $s <= 8 && - $t =~ m/[a-z]/; + $t =~ m/[a-h]/; $s = $r + 1; $graph->add_edge(qq/$c$r/, qq/$t$s/) if $s >= 1 && $s <= 8 && - $t =~ m/[a-z]/; + $t =~ m/[a-h]/; ## # right @@ -67,13 +67,13 @@ sub build_graph{ $graph->add_edge(qq/$c$r/, qq/$t$s/) if $s >= 1 && $s <= 8 && - $t =~ m/[a-z]/; + $t =~ m/[a-h]/; $s = $r + 1; $graph->add_edge(qq/$c$r/, qq/$t$s/) if $s >= 1 && $s <= 8 && - $t =~ m/[a-z]/; + $t =~ m/[a-h]/; } for 1 .. 8; } for q/a/ .. q/h/; |
