Hi all,
I'm creating a simple search-and-replace function for strings inside an XML document (specifically, I'm adding links to word-definitions within an educational program). However, I'd like the system to ignore anything that is within an pair of angled-brackets ("<>"). For example, in the text below,
<text>
Blah blah blah <img src="blah blah"/> blah blah
</text>
I would want to IGNORE the "<text>" tags and the <img src="blah blah"/> element.
What's the best way to do this?
I thought I could just tell it to look for any string {string}, and not any string with an open bracket to the left and a close bracket to the right <.*{string}.*>, but this would ignore even the text I want, because it doesn't check if the brackets have been closed.
Any ideas would be much, much appreciated!
Sam