Subject: | %_d will not match spaces properly |
Date: | Mon, 14 Feb 2011 15:11:45 -0500 |
To: | "bug-Regexp-Common-time [...] rt.cpan.org" <bug-Regexp-Common-time [...] rt.cpan.org> |
From: | Bob Kleemann <bob.kleemann [...] anonymizerinc.com> |
Regexp::Common::time strftime will not match properly for %_d (and assumably other %_-values):
$ date --date 'Mon Feb 7 11:41:06 PST 2011' +'%b %_d %Y' | perl -MRegexp::Common=time -ne 'print if /$RE{time}{strftime}{-pat => "%b %_d %Y"}/'
But it will if you add an extra space in the right location:
$ date --date 'Mon Feb 7 11:41:06 PST 2011' +'%b %_d %Y' | perl -MRegexp::Common=time -ne 'print if /$RE{time}{strftime}{-pat => "%b ?%_d %Y"}/'
Feb 7 2011