I have the following Java code:
str = str.replaceAll(\"<.*?>.*?|<.*?/>\", \"\");
This turns a String like so:
This isn't elegant, but it is easy to follow. The below code removes the start and end XML tags if they are present in a line together
"www.xml.com"<\url> , "This is xml"<\body>
Regex :
to_replace='<\w*>|<\/\w*>',value=""