On Wednesday 22 October 2003 16:15, Jason Wong wrote:
> $input_string = "#ircchannel";
> if (preg_match("/^#[a-zA-Z]+/", $input_string) {
> echo "Looks like an irc channel"; }
> else {
> echo "Go check your input";
> }
Sorry that regex should look like:
if (preg_match("/^#[a-zA-Z]+$/", $input_string) {
--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-db
------------------------------------------
/*
The problem that we thought was a problem was, indeed, a problem, but
not the problem we thought was the problem.
-- Mike Smith
*/
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php