I need to remove \s*,\s* but only when it's not between ".
For example, this string a, b , c, "a, b , , c," a ,, should look like abc"a, b , , c," a.
As I found out [^abc] means don't touch abc and \.* means everything so I tried this:
str = str.replaceAll("[^\"\\.*,\\.*\"]\\s*,\\s*", "");
Important: amount of " is even.
\\.*means everything" - It actually will repeat the.character..means any symbol..literally.replaceAll("[^\".*,.*\"]\\s*,\\s*", "")It doesn't.a,b, "a, b?