regex to remove comma between double quotes notepad++ -
I'm trying to remove comS within double quotes from a CSV file in Notepad ++, I have it :
1070,17,2, GN3-670, "Collar B, M Stay", "2,606.45" And I need it:
1070,17,2, GN3-670, "Collar BM Stay", "2606.45" I use Notepad / Reg App I am trying to change the option with I pattern I tried all kinds of combinations, but did not manage to do this: (file has 1 million lines.)
Today I'm not completely sure anymore what a simple regex could do is? Maybe I should go with a script ... Python?
mrki, this is what you want (will be tested in N ++):
Search: ("[^",] +), ([^ "] +") Change : $ 1 $ 2 Or \ 1 \ 2 How does this work? In the first bracket group 1, comma (but not included) captures the beginning of the string. Capture the end of the string after comma in the second bracket group 2. Replacement replaces string with combination of group 1 and group 2.
In more detail: In the first bracket, if we match the opening double quotation marks, then any number of characters which are not commas. It means [^,] + . In the second bracket, we match all the letters which are [^ "] + , then double quotes
Comments
Post a Comment