Search code examples
javastringreplaceall

Replace single " (quotation mark)


How can I replace a single quotation mark " in a String in Java? Not the word inside a quote.


Solution

  • String s = someotherstring.replace("\"",""); // replace all occurrences of "