Re: regular expression

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jun 1, 2010 at 11:19 AM, Tanel Tammik <keevitaja@xxxxxxxxx> 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

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux