in reply to Help with a more precise regex

A little obfuscated, but I kind of like this method:

my %t = reverse ($value =~ /(\d+)([dh])/g); my $day = $t{d} || 0; my $hour = $t{h} || 0;

We're not surrounded, we're in a target-rich environment!

Replies are listed 'Best First'.
Re:^2 Help with a more precise regex
by LogicalChaos (Beadle) on Apr 25, 2003 at 20:31 UTC
    I Love You FolksTM! I've never used 'g' outside of s/// before.

    Thanks for the tip,
    LogicalChaos