How to remove html tags from the content of Rich Text Editor ?
For the purpose of auto tagging, I am storing the contents of RTE in a string array and comparing it against tag namespace. When I try to store the contents of RTE in string array I am getting all the html tags \n,  , etc in the array. I am able to manually remove these tags by the following code:
textEntered = textEntered.replaceAll("\\<.*?\\>", "");
textEntered = textEntered.replace("\n", " ").replace("\r", " ");
textEntered = textEntered.replaceAll(" ", " ");
Is there any other proper or more logical way to remove all the tags from the content of RTE? Any help for more understanding would be much appreciated. Thanks in advance.