in reply to Parse Hex Values

Here are some changes I'd make:

use warnings; use strict; while (my $line = <DATA>) { if ($line =~ m/"P7"\:/) { if ( $line =~ /Mem:(0x[[:xdigit:]]+) to Mem:(0x[[:xdigit:]]+)/) +{ print "First Value $1 \n"; print "Second Value $2 \n "; } } } __DATA__ P7: "P7": place in [from Mem:0x5ffa5800 to Mem:0x60077fff]

Replies are listed 'Best First'.
Re^2: Parse Hex Values
by ldtucker (Initiate) on Sep 23, 2013 at 19:44 UTC

    Hi Apologies for the lack of tags. The regex supplied worked perfectly and I want to thank you