ValidateFilter
(
String sString
)
{
Debug.Assert(sString != null);
AssertValid();
// Windows Desktop Search throws an exception if you pass it nothing
// but spaces and special characters. Prevent this.
//
// Note: Don't use \w, because that includes the underscore character.
//
// TODO: This can't be the correct way to do this. What if a non-
// ASCII character set is in use?
Regex oRegex = new Regex("[a-zA-Z0-9]");
return ( oRegex.IsMatch(sString) );
}