in reply to Metatag processing (overlapping regions)

I don't think there is a single 'correct' solution to your problem. If the tag regions overlap, the resulting string will be dependent on the order of actions that you want to apply to your string. No way out here in the general case.

On a more pragmatical note, I doubt it would be wise to try to do it in a single run through the string. All you achieve is headaches figuring out which order of actions is imposed on you by the complicated algorithm you will come up with. Rather make this order explicit, and do several runs through the string. This way, it will at least be explicit what happens.

Christian Lemburg
Brainbench MVP for Perl
http://www.brainbench.com

  • Comment on Re: Metatag processing (overlapping regions)