diff options
| author | Jaime <42359730+bracteatus@users.noreply.github.com> | 2019-08-01 10:31:41 -0600 |
|---|---|---|
| committer | Jaime <42359730+bracteatus@users.noreply.github.com> | 2019-08-01 10:31:41 -0600 |
| commit | ea48c844662cf8bcee823aaa44b61df47c587bac (patch) | |
| tree | 39098f6e109e633a74602429dfb81ebc6859b30f /challenge-019/jaime/perl5 | |
| parent | 3340d5c7c3068d643b0297e4ad1971fbd1be024b (diff) | |
| download | perlweeklychallenge-club-ea48c844662cf8bcee823aaa44b61df47c587bac.tar.gz perlweeklychallenge-club-ea48c844662cf8bcee823aaa44b61df47c587bac.tar.bz2 perlweeklychallenge-club-ea48c844662cf8bcee823aaa44b61df47c587bac.zip | |
Simplify regex.
Diffstat (limited to 'challenge-019/jaime/perl5')
| -rw-r--r-- | challenge-019/jaime/perl5/ch-1.pl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/challenge-019/jaime/perl5/ch-1.pl b/challenge-019/jaime/perl5/ch-1.pl index 74e7c065d4..2cc4b0c1da 100644 --- a/challenge-019/jaime/perl5/ch-1.pl +++ b/challenge-019/jaime/perl5/ch-1.pl @@ -6,7 +6,7 @@ for my $year (1900..2019) { for my $month (1, 3, 5, 7, 8, 10, 12) { my $cal = `cal -h -m $month $year`; - # print months with 31 days that start on a Friday. - print $cal if $cal =~ /^(\V+\v+){2}\h+1\h+2\h*\v/; + # print months with 31 days that end on a Sunday. + print $cal if $cal =~ /\v31\h*$/; } } |
