
September 6th, 2009, 04:07 AM
|
|
Contributing User
|
|
Join Date: Feb 2004
Location: London, England
|
|
|
Nearly - you need to put the "-" as the first character in the square brackets, otherwise it will complain that you have an unterminated range starting from space. i.e.
^[-A-Za-z0-9 ]*$
It will also match an empty string, which may or may not be what you want. If you want it to match at least one character then replace the * with +.
Dave
|