From the given paragraph of text, write a program to match
the strings of format “Any number of numerals followed by
an underscore followed by any number of alphabets"
ex:123_abc
(Note:using regular expressions)
Answer Posted / kp
private void RegExp(string input)
{
string s = input;
Regex regexp = new Regex("^[0-9]*_[A-Za-z]*$");
if(regexp.IsMatch(input))
Console.WriteLine("Matched");
else
Console.WriteLine("Not Match");
}
| Is This Answer Correct ? | 19 Yes | 2 No |
Post New Answer View All Answers
What are the security types in asp.net?
Is asp.net easy to learn?
Explain login control and form authentication.
Describe how ASP.NET maintains process isolation for each Web application?
What is the default Orientation property in a Menu control?
Elaborate differentiation between Cache and Application?
What are the differences between clr & cts?
Why do I get error message "could not load type" whenever I browse to my asp.net web site?
Where do the cookie state and session state information be stored?
What is validation in asp.net?
What symbol specifies the beginning of a query string?
What is GAC in ASP.NET 2.0
What’s the use of “GLOBAL.ASAX” file?
What is server redirect?
What is the difference between viewstate and hidden field in asp.net?