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 is asp.net with mvc? : Asp.Net MVC
In order to get assembly info which namespace we should import?
What is the difference between Session and response.Redirect?
What is the difference between “Web.config” and “Machine.Config”?
What is the mvc model?
What is page fragment caching?
ASP.NET 2.0's new membership API used for creating and managing user account is exposed through which 2 clause?
What does asp stand for in asp.net?
How do I send an email message from my ASP.NET page?
What is the concept of postback in asp.net?
What is the difference between ASP.NET Webforms and ASP.NET MVC?
Explain the difference between inline and code behind - which is best in?
Which protocol is used to call web service?
What is aspect-oriented programming?
Which is better php or asp.net?