On Sat, Dec 30, 2006 at 12:47:31AM -0800, John H. Robinson, IV wrote:
> George Geller wrote:
> > Overall, I liked Chris Grau's the best for reasons that were already
> > discussed.
> 
> I don't like his RE, though it has a good anchor and matches an IP
> well, but not perfectly. It will match an illegal octet. I'm also not
> a big fan of the xms flags to the m//, especially in this case where
> the only whitespace used was in a character class (x), no anchors were
> used (m), and wild-card . was not used (s).

In my defense, I just copied George's RE without really giving it much
thought because I was sleepy.  In retrospect, a much simpler RE based on
"inet addr" and the space after the IP is a better solution (which I
think I mentioned on IRC).  :)

The /xms is something I'm trying out from Damian Conway's _Perl Best
Practices_.  We'll see how much I like it and if I end up sticking with
it.  So far, save for when I forget to escape whitespace, it's more DWIM
than leaving it out.

-chris

Attachment: pgpEzsozxoA2u.pgp
Description: PGP signature

-- 
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-lpsg

Reply via email to