Re: eregi help please
| From: | lwh at mysqldeveloper dot com | Date: | Tue, 17 Oct 2000 16:35:19 +0000 |
| Subject: | Re: eregi help please | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-20665@lists.php.net to get a copy of this message | ||
On Tue, 17 Oct 2000, Jeff Lacy wrote:
> I am using
>
> if (eregi("[a-z0-9. ]+$", $string)) {
>
> and it works just like a charm. Thanks, Hardy.
>
that will match on a string like "ABC@#(& abc123"
as long there is one or more of a-z 0-9 . or space at the end of the
string. if you put it between ^ $ it will ensure the entire string is
made up of only those characters.
this one someone said already:
^[a-z0-9. ]+$
should work right
Luke