Hi,
try
using System.Text.RegularExpressions.*;
bool bIsAlphaNum = Regex.IsMatch (strInput, "^\\w*$");
Replace * with + if you want empty strings to be considered not alpha
numeric.
^ matches begin of string,
\w* matches zero or more consecutive alphanumeric _characters_,
$ matches end of string.
HTH
greetings
"Nader" <na**********@hotmail.com> wrote in message
news:uN**************@tk2msftngp13.phx.gbl...
Hi everyone,
In C# how do you verify if a string is alphanumeric?
Thanks for suggestions.