Some SGML files use revision tagging as in the following example:
As they are not part of a named contextual tag pair (eg. <change></change>), this can cause problems with them becoming incorrectly nested inside each other.This is a sentence <revst>and this part has been revised<revend>.
So I'm trying to come up with a neat string that will detect any instances of:
- A <revst> soon followed by another <revst> (ie. before the first has been resolved by a <revend>)
- A <revend> soon followed by another <revend> (ie. before a <revst> has triggered the next pair)
Between the repeated <revst> or <revend>, anything else might occur (including other tagging and Newlines), although there are no other tags whose name begins with "rev".
I'm sure I'm on the cusp of something using lookaheads, but it's starting to hurt. :)
Thanks for any help.