I am using a rich text editor on my website and i am using a label to display what the user entered last time he used the box, but when he submits the code it includes the html from the label. When I submit the form it writes the following….
<span id="bodyContent_header1"> <div style"float:right">The Text On The Page </div> </span>
I need to remove the <span id="bodyContent_header1"> </span> from the code and keep the rest. Can anyone help? Also the code might include other span tags, so it should only remove this one each time.
Given that such strings are a single line you can use the regex
^<span[^>]+>|</span>$to replace the outermost<span>tags like this:This works on RegexHero.