Hey,
how can I replace everything between two strings(including the strings themself) in
Java?
it would look something like this:
String string = text text text text text <!-- Begin Sequence text text text --> tex text text text <!-- text text text --> text text text <!-- Begin Sequence text text text -->;
I only want to delete parts that start with: <!-- Begin Sequence ... ->, but keep parts that dont contain "Begin Sequence": <!-- text text text ->.
I already tried to use .replaceAll("(?s)<!--.*?-->", "");
But it ends up deleting every '<!--' and '-->'...
Anybody got a solution to my problem? if you didnt understand what I was trying to say then please ask