I know that there are already many questions like mine, but I have not found an answer that works in Java. Therefore, I am writing a new question.
I have text files with content like this:
key1 = "This is a \" test \ "text with escapes using '\\' characters";
key2 = 'It must work with \' single \ 'quotes and "double" quotes';
I need a regular expression that matches the values ββin double quotes (or single quotes). This regex must support hidden quotes and flush backslashes. The regular expression should work with standard Java Pattern / Matcher patterns.
java regex escaping quotes
kayahr
source share