diff options
author | Karl Williamson <khw@cpan.org> | 2021-01-14 07:52:26 -0700 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2021-01-20 06:51:50 -0700 |
commit | 1b2f32d508340483aa270e0caf653ba0454345d1 (patch) | |
tree | 154177a878f233a5023ff8bbb06271fed6526c38 /pod/perlrequick.pod | |
parent | a44b2be795f4c5f94384c6f6010860588e144b3c (diff) | |
download | perl-1b2f32d508340483aa270e0caf653ba0454345d1.tar.gz |
Allow blanks within and adjacent to {...} constructs
This was the consensus in
http://nntp.perl.org/group/perl.perl5.porters/258489
Diffstat (limited to 'pod/perlrequick.pod')
-rw-r--r-- | pod/perlrequick.pod | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pod/perlrequick.pod b/pod/perlrequick.pod index 6a70e9cd0d..38970dd70a 100644 --- a/pod/perlrequick.pod +++ b/pod/perlrequick.pod @@ -378,7 +378,7 @@ Here are some examples: /(\w+)\s+\g1/; # match doubled words of arbitrary length $year =~ /^\d{2,4}$/; # make sure year is at least 2 but not more # than 4 digits - $year =~ /^\d{4}$|^\d{2}$/; # better match; throw out 3 digit dates + $year =~ /^\d{ 4 }$|^\d{2}$/; # better match; throw out 3 digit dates These quantifiers will try to match as much of the string as possible, while still allowing the regex to match. So we have |