I want to replace all commas except in double quotes in java using regex.I am excepting output as \"Lee Rounded Neck, Printed\"#410.00#300.00#\"Red Blue\"#lee"
String line="\"Lee Rounded Neck, Printed\" 410.00 300.00,\"Red Blue\",lee";
String repl = line.replaceAll("(?!\")\\,", "#");
System.out.println("Replaced => " + repl);
But i am getting "Lee Rounded Neck# Printed" 410.00 300.00#"Red Blue"#lee
Please someone Help me in this regards