>>>>> "Steve" == Steve Bertrand <[EMAIL PROTECTED]> writes:
Steve> I'm just beginning to learn a bit about some of the more obscure Steve> regex's, but I'd like to ask if this following regex would ensure no Steve> IP's got trapped in the @dns array? (Assuming that no .tld ends in a Steve> \d): Steve> push (@dns, $_) if $_ =~ /^\w+-?[\w+]?\.?[\w+.{1}]*[a-zA-Z]{2,3}$/; This is wrong because it uses \w repeatedly, not [-0-9a-zA-Z], which is needed. Underscore is not legal in hostname parts. Dash is. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 <[EMAIL PROTECTED]> <URL:http://www.stonehenge.com/merlyn/> Perl/Unix/security consulting, Technical writing, Comedy, etc. etc. See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training! -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>