|
|
| Perl Monk, Perl Meditation | |
| PerlMonks |
Re: Replacing commas in a substring when it is between quotes (2 ways)by tye (Sage) |
| on Mar 28, 2012 at 19:38 UTC ( [id://962246]=note: print w/replies, xml ) | Need Help?? |
|
Using Text::CSV seems like a more likely way to get it right on the first try. But your idea isn't hard to do:
You can also replace the regex with something that handles escapes. Just for variety, here is another approach:
- tye
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||||||||