c# isalphanumeric

122

c# isalphanumeric -

        string str = "ABC123";
 
        if (Regex.IsMatch(str, "^[a-zA-Z0-9]*$"))
        {
            Console.WriteLine("Alphanumeric String");
        }
        else
        {
            Console.WriteLine("Non-Alphanumeric String");
        }

Comments

Submit
0 Comments