On Tue, Jun 1, 2010 at 11:19 AM, Tanel Tammik <keevit...@gmail.com> wrote:

> How to check with regular expression (preg) if string has:
>
> 1. only letters
> 2. only letters and spaces
>
> Br
> Tanel
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
$re1 = '/^[a-zA-Z]+$/';
$re2 = '/^[a-zA-Z ]+$/';

Adam

-- 
Nephtali:  PHP web framework that functions beautifully
http://nephtaliproject.com

Reply via email to