Re: Checking for HTTP:// at the start of a string and more ////

From: Date: Sun, 02 Mar 2003 00:17:02 +0000
Subject: Re: Checking for HTTP:// at the start of a string and more ////
Groups: php.general 
Request: Send a blank email to php-general+get-137731@lists.php.net to get a copy of this message
Untested: if (preg_match('/^http:\/\/[^\.\s]+\.[^\s]+\/$/i', $string)) // valid string else // invalid string Should match a string beginning with 'http://', followed by one or more characters that are no dots or whitespace, followed by a dot, followed >by one or more characters that are not whitespace, and terminated with >a slash. The terminating 'i' makes the search case insensitive.
I've also been looking for this information. Can you please point me to a list of those string codes? My search for them in the documentation has been fruitless. _________________________________________________________________ The new MSN 8: advanced junk mail protection and 2 months FREE* http://join.msn.com/?page=features/junkmail

« previous php.general (#137731) next »