Hi Dylan
I used your example in my code:
if (!([A-Za-z0-9]*.test(document.form1.fred.value)))
{
......
}
but it generates a syntax error.
Do you know what I've done wrong?
Rgds Robbie
"Dylan Parry" <us****@dylanparry.com> wrote in message
news:3m*************@individual.net...
Using a pointed stick and pebbles, Astra scraped:
I just can't find the Reg Exp syntax for just letters and numbers, eg A-Z,
a-z and 0-9.
[A-Za-z0-9]*
This will match zero or more letters and numbers. Replacing the * with a
+ will require one or more characters.
Of course, this will not match non-Latin letters or space characters
either, so you may have to fiddle with it if you require the ability to
use those.
--
Dylan Parry
http://webpageworkshop.co.uk -- FREE Web tutorials and references