The following module was proposed for inclusion in the Module List:
modid: Regexp::Date
DSLIP: bdpnp
description: Extend regexps to match dates using % codes
userid: ABARCLAY (Alan Barclay)
chapterid: 11 (String_Lang_Text_Proc)
communities:
Toronto Perl Mongers group
similar:
rationale:
Matching dates is quite hard to do correctly. In order to match an
hour takes 25 characters, and in order to match a julian day takes
even more, 66 characters.
POSIX::sprftime uses % characters followed by a letter to indicate
the parts of a date, as does Date::Format. By overloading the regexp
engine, we can extend it to recognize these codes.
$time="12:43"; ... if($time =~ /%H:%M/){ ... }
Much easier to read, and more likely to be correct.
enteredby: ABARCLAY (Alan Barclay)
enteredon: Thu Jun 21 14:31:30 2001 GMT
The resulting entry would be:
Regexp::
::Date bdpnp Extend regexps to match dates using % codes ABARCLAY
Thanks for registering,
The Pause Team
PS: The following links are only valid for module list maintainers:
Registration form with editing capabilities:
https://pause.perl.org/pause/authenquery?ACTION=add_mod&USERID=6e000000_bd236a38ab6fc875&SUBMIT_pause99_add_mod_preview=1
Immediate (one click) registration:
https://pause.perl.org/pause/authenquery?ACTION=add_mod&USERID=6e000000_bd236a38ab6fc875&SUBMIT_pause99_add_mod_insertit=1