Msg#: 3546860 posted 7:28 pm on Jan 13, 2008 (gmt 0)
$pattern = "/[^\d\w\s]/";
As said \s is 'space', not just a single space, but 'whitespace' so things like tab are included in \s. So if you dont want general whitespace then use - /[^\d\w ]/"
\w is a-zA-Z_ so there is also the _ in there. So if you are bothered about having that in your expression then you need - "/^[\d a-z]/i"
i so you dont have to type the upper case letters as well
Have a read through the Pattern Syntax [uk.php.net] to see exactly what is getting excluded. As \w depends on the locale set, so if your server is in France but you are expecting a-z as 'word' then that isnt all you are going to get, as some of the accented letter will also be in the 'word' character class.