I want to replace the empty tag (same tag name) such as:
<i>12341234</i><b></b> to <i>12341234</i>
and also:
<b>1234</b><b>5678</b> to <b>12345678</b>
Thank you very much!!!
I want to replace the empty tag (same tag name) such as:
<i>12341234</i><b></b> to <i>12341234</i>
and also:
<b>1234</b><b>5678</b> to <b>12345678</b>
Thank you very much!!!
For the first line:
<([^\<\>/]+)></\1>
For the second line:
</([^\<\>]+)><\1>
And you replace the matched characters by nothing to remove them. In addition, you can limit the number of characters inside the tag like this (5 in this case):
<([^\<\>/]{1,5})></\1>