# having dealt with edge cases check for the valid chars return 0 unless m/^[A-Za-z0-9\.\-]+\z/;
Depending on the reason for testing the input, you may want to allow underscores in there so that things like dear_raed.blogspot.com get through — that's technically invalid but is in use; it works for me at home but not in the office.
Smylers
In reply to Re^2: Syntactically check domain name/IP
by Smylers
in thread Syntactically check domain name/IP
by johnnywang
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |