I was greatly entertained by how you ignored every last shred of advice in this topic. You didn't even take the part about [\d|\.] not meaning what you think it means, and used it anyway.
Either way i would talk to the person sending you this CSV since its not a legal CSV if they are putting data with commas in it without quoting those fields.
BTW you can store repeated elements of your regex in a named variable. Like:
my $num = qr/[\d.]+/; if ($line = m/^([^,]+),([^,]+),$num,$num,$num,$num,,$num,$num,$num,$nu +m,,$num,$num,$num,$num/) {
That way if you want to update that pattern you can update it just once.
In reply to Re^3: Anything that is not ',' except .... RegEx question
by eric256
in thread Anything that is not ',' except .... RegEx question
by Win
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |