I need to remove style tags from text file..
I tried the following code
String text = readFile("E:/textwithstyletags.txt");
retVal = text.replaceAll("<style(.+?)</style>", "");
it works when the text file has style tags without new lines
i.e. <style> body{ color:red; } </style>
It doesn't work when there are new lines, like this
<style>
body{
color:red;
}
</style>