First off, may we see an excerpt of the relevant records?
Is it a CSV file or database record? It obviously can't be both.
split /(\".*?\"(?=,))|(.*?(?=,))|(.*?(?=\n))/
Using $1 which results from your capturing parentheses in addition with split seems weird. Imagine, you're excluding the chunks specified by the pattern from the resulting list and capturing the values which match the pattern (\".*?\"(?=,))|(.*?(?=,))|(.*?(?=\n)) itself.
The lookaheads are okay though.
In reply to Re: Perl is returning... odd results... from regular expressions. Things matching when they shouldn't, and stuff like that.
by shigetsu
in thread Perl is returning... odd results... from regular expressions. Things matching when they shouldn't, and stuff like that.
by Groxx
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |