I have a XML String of 400 lines and it does consists of below tags repeated twice. I want to remove those tags
<Address>
<Location>Beach</Location>
<Dangerous>
<Flag>N</Flag>
</Dangerous>
</Address>
I am using the below regex pattern but it's not replacing
xmlRequest.replaceAll("<Address>.*?</Address>$","");
I can able to do this in Notepad ++ by selecting [x].matches newline
checkbox next to Regular Expression
radio button in Find/Replace dialog box
Can anyone suggest what's wrong with my regular expression