Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

(MeowChow) Re: Delete unmatched quotes from a delimited file?

by MeowChow (Vicar)
on Jul 24, 2001 at 21:58 UTC ( [id://99430]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    s/((?:^|\|)(?:[^"|]*"[^"|]*")*[^"|]*)"([^"|]*)(?=$|\|)/$1$2/g;
    
  2. or download this
    my $T = qr/[^"|]*/;
    s/((?:^|\|)(?:$T"$T")*$T)"($T)(?=$|\|)/$1$2/go;
    
  3. or download this
    join '|', map { s/"([^"]*)$/$1/ if y/"// & 1; $_ } split /\|/;
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (4)
As of 2024-04-19 17:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found