Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: regexp mystery no xxx

by ides (Deacon)
on Aug 18, 2003 at 21:22 UTC ( [id://284728] : note . print w/replies, xml ) Need Help??


in reply to regexp mystery no xxx

WOW! I have no idea why, but if you remove the 'g' option on the second regex it works as expected. There really isn't a need for the 'g' in these examples because you're binding on ^ and $ which makes the 'g' useless.

-----------------------------------
Frank Wiles <frank@wiles.org>
http://frank.wiles.org