On Wed Apr 25 06:17:47 2001, jeff@yahoo-inc.com wrote: > Hi. The attached program behaves differently on 5.005 and > 5.6. The relevant part is the regular expression > m#(\G|\n)([^\n]*)\n#gsx, which under 5.005 iterates through > every line in the string, but under 5.6 gets stuck on the second > line and loops forever. > > I don't know if this was a bug in 5.005 that is now fixed, but > I can't figure out why it doesn't work. This bug persists in blead perl (v5.9.5). The attached patch fixes the immediate issue, but results in lib/Text/Balanced/t/extqlk.t failing some tests so it cant be applied. The test part could be converted to a TODO however and applied regardless. I have to say that the way /g code is handled in pp_match doesnt make a lot of sense to me, and some parts of it are IMO highly suspect. I dont think anything outside of the regexe engine should be assigning to the paren buffers, especially not without taking measures to undo the change in the case of a failed match. Anyway, im investigating further but assistance or advice would be welcome. Also I am renaming the bug to more accurately describe the underlying issue. Cheers, YvesThread Previous