EDIT
Proof that it should work: http://regexr.com?30pf2
I'm trying to replace all occurrences of ,
that are not within quotes with a ~
20,72275,Epidurography,1
21,72285,X-Ray C/T Spine Disk,1
22,72291,"Perc Vert/Sacroplasty, Fluor",1
23,72292,"Perc Vert/Sacroplasty, Ct",1
Becomes
20~72275~Epidurography~1
21~72285~X-Ray C/T Spine Disk~1
22~72291~"Perc Vert/Sacroplasty, Fluor"~1
23~72292~"Perc Vert/Sacroplasty, Ct"~1
My Regex works like a charm but I can't seem to replace the values it finds. Notepad++ highlights the comma to be replaced but passes over without making any changes when I click the Replace button.
Find what:
(,)(?=(?:[^"]|"[^"]*")*$)
Replace with:
~
I've tried other values thinking ~
was somehow reserved, but every other character or combinations of characters don't seem to work either. Hopefully this is just the result of some oversight on my part. Any help would be appreciated.
I'm using Notepad++ v6.1.1
Thanks!
Regex from https://stackoverflow.com/questions/632475/regex-to-pick-commas-outside-of-quotes
Replace All
. This sounds like a bug.