英文:
Illegal repetition near index error when using replaceAll in string
问题
I want to remove the divPrefix string from request string, but I am getting "illegal repetition near index 142" error message. Could you please help to resolve this issue.
Note: This divPrefix is in the json request, so it will be there in multiple places. Is there a change to replace it in one shot?
String request="<div class="artemis-editor" style="font-family:Arial,sans-serif!important;font-size: 11px!important;">
Paragraph content
";
String divPrefix="<div class="artemis-editor" style="font-family:Arial,sans-serif!important;font-size: 11px!important;">
";
request=request.replaceAll(divPrefix,"");
request=request.replaceAll("
评论