I have html like bellow
<html lang="en">
<head>
<meta http-equiv ...............
...................
</head> ..............
...............
</html>
I want to replace <head>.....</head>
with ""(empty) and final string should look like this
<html lang="en">..............
....................
</html>
I tried with this but no luck nothing changed. any help is appreciated
myStr= myStr.replaceAll("^<head>.*</head>$", "");
System.out.println(myStr);