Ok, I have this identifier to remove html. It has always worked fine until now.
alias htmlfree {
var %x, %i = $regsub($1-,/(^[^<]*>|<[^>]*>|<[^>]*$)/g,$null,%x), %x = $replace(%x, ,$chr(32))
return %x
}
I have the following Source data (I cut it down to just the part that is causing the problem):
<sup class='footnote' value='[<a href="#fen-NIV-26127a" title="See footnote a">a</a>]'>[<a href="#fen-NIV-26127a" title="See footnote a">a</a>]</sup>
Now, that *should* result in just
[a] being returned. Instead, it leaves:
a]'>[a] ... most likely due to the []'s in there. Can someone help to update the identifier so it doesn't miss that
a]'> part?
Note that I'll also accept any other good method to automatically remove that extra data. I know I could just $remove(%var,]'>) from it, but the "a" in there can be any letter and I don't really want to list out all letters in a $remove line... that's just not very efficient. Also note that there may be multiple footnotes on a line, so I can't just use $gettok to get the data.