I have a span tag like this:
<span id="item.2.2">3 October.--As I must do something or go mad, I write this diary.</span>
I'd like to be able to remove the open and closing span but leave the text within it. In addition the id part of the opening span does change, so it could be item.10.2 or item.100.5 so I would need to take that into account.
** edit ** Edited to add. The file(s) I'd want to replace this in also have span tags that of not include the id specifier and I do NOT want to remove them, or their closing , sorry I should have said that earlier.
Do a regex which replaces </?span[^>]*>
with empty string
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With