/^[A-Za-z ]+$/
Add any characters between the []. Though I think you'id need to use an
escape character like \-. Not sure, try it out.
--
Marcjon
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[EMAIL PROTECTED] (Andy Amol) wrote in
news:[EMAIL PROTECTED]:
> hi,
> Thanks for the reply.
> I want to know how to include char "-" i.e a dash . I want to test for
> it. eg: COSC-3006.
> I should be able to test that string as valid.
> Also is there a way in which the form validation fails bu
hi,
Thanks for the reply.
I want to know how to include char "-" i.e a dash . I want to test for it.
eg: COSC-3006.
I should be able to test that string as valid.
Also is there a way in which the form validation fails but when the user goes back to
the same form its previous values are retained.
Apr 18 at 11:01pm, Andy Ladouceur wrote:
> Andy Amol wrote:
> > I would like to test whether a given sting contains only character, it
> > should also support spaces. eg "Course Book String". I am able to test
> > "CourseBookString". Also I would like to know how can we avoid wild
> > chars like *,
A regexp like this should work:
/^([a-zA-Z]|\s)+$/
Cheers,
Andy Ladouceur
Andy Amol wrote:
Hi,
I would like to test whether a given sting contains only character, it should also support spaces.
eg "Course Book String". I am able to test "CourseBookString".
Also I would like to know how can