in reply to Is this a regex strangeness?

Replace
m/[a-g]+\n/
with
m/^[a-g]+\n$/
It was matching the "g\n" part of the input string.

By the way, it's <code> (or <c>), not [code].

Replies are listed 'Best First'.
Re^2: Is thie a regex strangeness?
by mr_mischief (Monsignor) on Jan 31, 2006 at 19:26 UTC
    Ah! How embarrassing. Yes, that makes perfect sense. It's been an off-kilter day all around.

    Sorry for the tag confusion on my part. I've been mostly away from the site for a long while.


    Christopher E. Stith