import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class Example {
public static void main(String[] args) {
final String regex = "\".*\"\\K|[^\"\\n]+";
final String string = "{LID.P21_MA4_DB,new String[]{\"Assumed probability of premise value(s)\",\"This is only useful if a premise value is defined. Reduces query execution time.\"}},\n"
+ "{LID.HOST_CFG_CASE_DOCS_FOLDER_SERVER_PATH,\"Case documents folder path server-side\"},\n"
+ "{LID.P12_MA3_T0,\"Main form {0} - {1}\"},";
final String subst = "";
final Pattern pattern = Pattern.compile(regex);
final Matcher matcher = pattern.matcher(string);
// The substituted value will be contained in the result variable
final String result = matcher.replaceAll(subst);
System.out.println("Substitution result: " + result);
}
}
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for Java, please visit: https://docs.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html