Dim pattern As String = "[aeiou]" TxtCountResult.Text = System.Text.RegularExpressions.Regex.Matches(TxtInputString.Text, pattern).Count
string str = TextBox1.Text; Label1.Text = Convert.ToString(Regex.Matches("str", "aeiouAEIOU").Count); Response.Write(Label1.Text);
string pattern = "[aeiou]"; string str = TextBox1.Text; Regex reg = new Regex(pattern, RegexOptions.IgnoreCase | RegexOptions.ExplicitCapture); Label1.Text = Convert.ToString(reg.Matches(str).Count);
Login to post response