Re: Re: Quickly verifying single word.
| From: | Per Jessen | Date: | Thu, 05 Jun 2008 06:19:45 +0000 |
| Subject: | Re: Re: Quickly verifying single word. | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-275042@lists.php.net to get a copy of this message | ||
Shawn McKenzie wrote:
>> if (preg_match('/[\s]*/', $string) === false) {
>> echo 'No spaces!';
>> }
>>
>> -Shawn
>
> Second one doesn't work for some reason. No time now to test, will
> later.
How about:
if (preg_match('/\s/', $string) === false) {
echo 'No spaces!';
}
/Per Jessen, Zürich