^[a-zA-Z0-9]+$will match any letters and any numbers without spaces (or any punctuation) in a string. It will also require at least one alphanumeric character. A character class is used for matching . Structure:
^
[
a-z
A-Z
0-9
]
+
$
, "" , , parens (a ), :
^([a-zA-Z0-9]+)$
: #, MSDN .NET. . , RegexOptions.IgnoreCase, :
^([a-z0-9])+$