Not that I can tell from the code... Starting from the beginning, push the substr location onto the end, then in another loop, pop off that ending and use it for replacement. Only the locations at the end are affected which is why it starts at the end. An iterator is used to provide a wrapper around each iub key. If I make my version and the perl version print out the final sequence, they're identical.

On Dec 17, 2005, at 9:47 AM, Leopold Toetsch wrote:

Joshua Isom wrote:
  Commented
out is code to use capturing regex to do it for the final substitution. PGE seems faster with the coroutine.

Doesn't it now substitute on wrong positions after the first replacement?

leo



Reply via email to