Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Remove tabs only between quotation marks

by JavaFan (Canon)
on Apr 12, 2011 at 16:27 UTC ( [id://898991]=note: print w/replies, xml ) Need Help??


in reply to Remove tabs only between quotation marks

Untested:
$str = join "", map {my $_ = $_; /^"/ && s/\t+//g; $_} $str =~ /"[^"]* +"|[^"]*/g;
This assumes you cannot have escaped quotes inside your quotes. And that your fields themselves do not contain quotes.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://898991]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (2)
As of 2024-04-26 00:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found