where in the ereg("^[a-zA-Z0-9_]{3,15}$", $cuvant) i should place \s+ ?
- Original Message -
From: "Matt Matijevich" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Thursday, April 22, 2004 3:34 AM
Subject: Re: [PHP] Problems
you need to account fir white space if you want phrases
\s+
I would switch to preg_match() instead of ereg()
http://www.php.net/manual/en/function.preg-match.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi,
i have a script that searches a database after a specific word.
this function check the entered word
function valid_word($word) {
if(ereg("^[a-zA-Z0-9_]{3,15}$", $word)) {
return true;
} else {
return false;
}
}
If i search for a word is ok but when i searches for a phra
3 matches
Mail list logo