I want to remove some particular text from my html content. I am using replaceAll method in java to replace the content with "" to achieve that.
My content is
<html xmlns="http://www.w3.org/1999/xhtml" lang="fr-CA" xml:lang="fr-CA"> or
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-AU" xml:lang="en-AU"> or
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-GB" xml:lang="en-GB"> or
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-IE" xml:lang="en-IE"> or
<html xmlns="http://www.w3.org/1999/xhtml" lang="es-PR" xml:lang="es-PR> or
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US" xml:lang="en-US">
I want to remove lang="-" xml:lang="-"
As you can see, value of lang and xml:lang is changing dynamically. So I want a regular expression which can detect this particular string sequence then I will replace it with "" using replaceAll(regex, string) method in java.
<html xmlns=".." ...> or <html xmlns=".." ...>real content, or did you perhaps mean that content can be<html xmlns=".." ...>or<html xmlns=".." ...>?