replace part of different strings (perl, bash) -


i replace text in csv-file in several lines:

input:

any text,"texta, textb",any text 

ouput:

any text, texta; textb,any text 

(i.e.: substitute comma semicolon in case located between 2 quotation marks, , remove quotation marks)

i tried sed , wildcards texta , textb not able print texta , textb in output file. help!

$ sed -r 's/"([^"]+),([^"]+)"/\1;\2/g' file text,texta; textb,any text 

Comments

Popular posts from this blog

authentication - Mongodb revoke acccess to connect test database -

r - Update two sets of radiobuttons reactively - shiny -

ios - Realm over CoreData should I use NSFetchedResultController or a Dictionary? -