Hi
I'm tring to extract some values delimited by quotes
I can extract the first set using "([^"]*) but not the second set using
"([^"]*),"([^"]*). Could I have a clue please?
Regards
CJ
CODE
use strict;
my $file = "test.txt";
#extract from file
my $stuff="e:/$file";
open STUFF, $stuff or die "Cannot open $stuff for read :$!";
while (<STUFF>) {
if (/new Array\\\(\\\);\\nkeyComp\[.+\] = "([^"]*)/g){
print "$1 \n";
}
}
print "END OF FILE";
TEST.TXT
new Array\(\);\nkeyComp[10] =
"1202 2012 00","MA\
CH 120F Stand Lamp,"
new Array\(\);\nkeyComp[0] =
"3502 3021 00","Trigenflex R9\
6 Wall Mounted Lamp"