in reply to Determining if you have balanced delimiters
In retrospect, I should have just put this in seekers and just asked monks how they would approach the . problem. The above comments about the limitation of this approach were correct. I just want to figure out how to get rid of that frickin' dot! merlyn's proposal (which he acknowledged was untested) didn't pan out:
$middle = "(?:(?!$left|$right|$escape$left|$escape$right).)";
Cheers,
Ovid
Join the Perlmonks Setiathome Group or just click on the the link and check out our stats.
|
|---|