[Omaha.pm] Regexp::Common::zip is pretty slick
Jay Hannah
jay at jays.net
Mon Dec 10 12:43:53 PST 2007
Wow. This would have been nice to have back in 1999 when I worked for
a European telcom...
CPAN rules.
j
/$RE{zip}{Germany}/;
# Matches 'DE-12345' and 'D-12345'.
/$RE{zip}{Germany}{-country => 'iso'}/;
# Matches 'DE-12345' but not 'D-12345'.
/$RE{zip}{Germany}{-country => 'cept'}/;
# Matches 'D-12345' but not 'DE-12345'.
/$RE{zip}{Germany}{-country => 'GER'}/;
# Matches 'GER-12345'.
http://search.cpan.org/~abigail/Regexp-Common-2.120/lib/Regexp/Common/
zip.pm
More information about the Omaha-pm
mailing list