I have this regex to obfuscate the password
myString.replaceAll(
"<.{1,}:Password>.{1,}</.{1,}:Password>",
"<!--<Password></Password> Removed-->");
When myString contains the following line it successfully obfuscates the password
<abc:Password>myPassword</abc:Password>
But if myString contains the xml without schema prefix i.e
<Password>myPassword</Password> it does not obfuscate the password.
How to extend the existing regex so that it processes both cases?