in reply to Re: RegEx Confusion
in thread RegEx Confusion

Yep, same result here. Hmm, I must be getting some special characters back from the routers. Thanks for the tip!!! Time to dig out tohex (after I get done beating my head against a wall of course! :-)

P.S. I left the 'i' on as a reminder when reading through the code. I wonder what TheDamian would recommend?!

-- Argel

Replies are listed 'Best First'.
Re^3: RegEx Confusion
by ikegami (Patriarch) on Sep 21, 2005 at 20:25 UTC

    Good luck. About the "i", keep in mind that the following won't match:

    $pattern = qr/A/; if ('a' =~ m/$pattern/i) { print("Match (case-insensitive)\n"); } else { print("No match (case-sensitive)\n"); }

    Whatever is or isn't on the qr// overrides what is or isn't on the m//. The "i" is misleading. If you want, you could drop the m// altogether:

    $pattern = qr/A/; if ('a' =~ $pattern) { print("Match (case-insensitive)\n"); } else { print("No match (case-sensitive)\n"); }