Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
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 contemplating the Monastery: (6)
As of 2024-03-28 19:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found