Replace replace2 = (Replace) antProject.createTask("replace");
replace2.setFile(existingFile);
replace2.setToken("<!--" + nameInComment + "-END-->");
replace2.setValue("REGULAR-END");
replace2.execute();
ReplaceRegExp regExpTask = (ReplaceRegExp) antProject.createTask("replaceregexp");
regExpTask.setFile(existingFile);
regExpTask.setMatch("REGULAR-START(?s:.)*REGULAR-END");
regExpTask.setReplace("");