Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

RE: Test the syntactic validity of a domain name

by ncw (Friar)
on Sep 22, 2000 at 18:00 UTC ( [id://33632]=note: print w/replies, xml ) Need Help??


in reply to Test the syntactic validity of a domain name

It matches newlines at the end of the domain name :-

print could_be_a_host("www.domain.com\n"); # says 1
\z instead of $ in the regexps would fix it for recent perls as would a judicously placed chomp - but I'm sure you know this already!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://33632]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (4)
As of 2025-06-16 10:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.