Ah, OK, now I see. Only one of the each replacement is done for each loop. But isn't the same thing achieved by non-greedy regexps? That is one of the things I have changed in the markups, they are always non-greedy, which I think was because of something like this. Can't remember though... =]
But if Scream is going to change the markup system I'd say it is a good idea to look them over and make sure they work as good as possible and are as safe as possible. Changing [ b ] tags (etc) so that they are done with a single regexp is a good thing to start with, because if the user forgets a closing tag, the rest of the page will be bold. Not so good at all. =]