
Stefanik
User
Dec 28, 2012, 2:20 AM
Views: 2157
|
|
Re: [Stefanik] Match string in multi-line file
|
|
|
Hi try something more to exercise. If I have the string to extract not in the second field ($2), but in any part of the line, I'd use regular expression as indicate me: $FileTemp =~ s/:/\n/g; my $value1 = $2 if $FileTemp =~ /^TRANSID,\w+/; print $value1; But no output is returned. What I'm wrong?!? :(
(This post was edited by Stefanik on Dec 28, 2012, 2:40 AM)
|