in reply to Problem with regex

I got the correct value when I tried this

use strict; my $line = "this is a test=234567 line"; if ($line =~ /.*test=(\d+)/){ print $1; }
result
234567
Good Luck!!