Just another Perl shrine | |
PerlMonks |
Re: Looking for appropriate Regexby Loops (Curate) |
on Apr 07, 2013 at 09:22 UTC ( [id://1027339]=note: print w/replies, xml ) | Need Help?? |
Hi,
There are a number of ways to craft a regular expression to do this. One is to use look-behind and look-ahead assertions. These make sure the characters surrounding the space character match, but will leave them alone and not include them in the text to be replaced:
However, the results of any regex are likely to be spotty. If instead you use a module like Text::CSV to parse your csv files, you should be able to receive your data clean with all commas intact
In Section
Seekers of Perl Wisdom
|
|