S
sam
Hi,
The following pattern does not return all the values, the pattern only
able to parse the first two fields:
my $test = "01-, Revlon, n/a, Revlon";
$test =~
/^([0-9]*-), #prefix 1
(.*), #vendor 2
(.*), #Category 3
(.*) #basename 4
/x;
if ($1 eq "" or $2 eq "" or $3 eq "") {
print "Failed to parse $test\n";
} else {
# get the value
}
What should be the correct implementation of this pattern?
Thanks
Sam
The following pattern does not return all the values, the pattern only
able to parse the first two fields:
my $test = "01-, Revlon, n/a, Revlon";
$test =~
/^([0-9]*-), #prefix 1
(.*), #vendor 2
(.*), #Category 3
(.*) #basename 4
/x;
if ($1 eq "" or $2 eq "" or $3 eq "") {
print "Failed to parse $test\n";
} else {
# get the value
}
What should be the correct implementation of this pattern?
Thanks
Sam