[thelist] RegEx problem again

Kowalkowski, Lee (ASPIRE) lee.kowalkowski at hmrcaspire.com
Mon Aug 8 10:34:25 CDT 2005


> -----Original Message-----
> From: Tom Dell'Aringa [mailto:pixelmech at yahoo.com]
> var namematch = /^[a-zA-Z]{3,}$/.test(nametext.value);
> namematch = (namematch  || /^[a-zA-Z\*]{4,}$/.test(nametext.value));
> 
> Which worked just fine, till we realized we need to allow one 
> or more SPACES as well! How do you
> add a space to the pattern? (and allow for as many spaces as 
> they like?)

Just add a space to the character sets, so [a-zA-Z] becomes [a-zA-Z ].  Note
the space before the closing square bracket.

- LK


===========================================================
Our e-mail domain has now changed from iraspire.com to hmrcaspire.com. Please update your address books.
===========================================================



More information about the thelist mailing list