> if (($hostname) || ($HOSTNAME)) {
> $hostname= trim($hostname);
> if ($HOSTNAME)
> $hostname = trim($HOSTNAME);
> if (!eregi("^[-a-z0-9-]+(\.[a-z0-9-]+)*$ ", $hostname)) {
> print_error("your <b>your hostname</b> is invalid");
> }
> $HOSTNAME = $hostname;
> }
Things I know are wrong:
1. I don't think you want a - before the a-z
2. You have ()s around only the stuff *AFTER* the first character. So you
are losing that stuff in the ()s to be saved in the third argument you're
not providing to eregi()...
3. You didn't escape your \ from PHP, nor eregi(). You need \\\\, I think.
4. You have a space after the $, which is wrong.
5. You didn't escape the $ from PHP with \
Warning: I hate Regex, and have no idea if fixing these will get you any
closer to what you want.
--
WARNING [EMAIL PROTECTED] address is an endangered species -- Use
[EMAIL PROTECTED]
Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]