in reply to regular expression to get a decimal value

use warnings; use strict; my $line = '3p3V_MON Trip = 2.713V/2.681V'; if ($line =~ m{ 3p3V_MON \s+ Trip \s+ = \s+ ( [\d.]+ ) V/ ( [\d.]+ ) } +x) { print "$1 $2\n"; } __END__ 2.713 2.681

Replies are listed 'Best First'.
Re^2: regular expression to get a decimal value
by mark4444az (Sexton) on May 17, 2011 at 15:18 UTC
    That works great!! But... How does the result get into the $1 and $2 strings? (novice here, just want to know how it works)
        Ah!! Thanks.