Page 1 of 1

how to add hyphen

Posted: Mon Oct 16, 2006 1:31 pm
by iffo
Hi,

This is my regex, I want them to be able to enter hyphen, how could I do that?


'regex' => '/^[A-Za-z\']{2,40}$/',

Posted: Mon Oct 16, 2006 1:48 pm
by Oren

Code: Select all

$regex = '/^[A-Za-z\'\-]{2,40}$/';

Posted: Mon Oct 16, 2006 6:17 pm
by iffo
thans a lot