in reply to Re: Newbie RegEX question
in thread Newbie RegEX question
my @bitbucket; $_ = '001WhitePottery.jpg'; if (m< ^ (\d+) ([A-Z][a-z]+) ([A-Z][a-z]+) >x) { my($serial, $name, $cat) = ($1, $2, $3); print "($serial) Serial\n", "($name) Name of Product\n", "($cat) Category\n"; } else { push @bitbucket , $_; } print "The following files didn't match rule - please fix"; print "$_\n" foreach (@bitbucket);
I only point this out as the OP claimed newbie status.
Cheers - L~R
|
|---|