notepad++ - Regex to find immediate duplicate tag -


i using notepad++, wherein have find , remove immediate duplicate html tag shown below

actual

<a href="www.google.com"><a href="www.google.com">www.google.com</a></a> 

required

<a href="www.google.com">www.google.com</a> 

i have regex find duplicates comes in new line, search in line.

pl me

find:

(<(\w+)(\s[^>]*)?>)\1(.*)(<\/\2>)\5

replace:

\1\4\5

tested in sublime.


Comments