on a side note, if you CAN use perls internal char classes you really want to do
that
firstly to avoid typos, secondly, they're much faster.
and if you're using the same regexp over and over again, you *might* want to
concider building it outside the loop with the /o switch
(this all performace bits of course)
so in short, try:
my ($d,$m,$y) = $string =~ /(\d+)(\D+)(\d+)/
\D is perfectly safe here, but tehn again, we know context... =)
hth,
Jos Boumans
<snip>
> > I stand by my reply to this post. Sure, unpack is quicker. But if you use
> > regex, i always prefer to use my own defined regex's
> >
> > my $dateis = "2Jul2001";
> > my ($date,$month,$year) = $dateis =~ /([0-9]+)([A-Za-z]+)([0-9]+)/;
> >
</snip>