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 / thanvir
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 ? | 3 Yes | 2 No |
Post New Answer View All Answers
What is http session state?
What are the options in ASP.NET to maintain state?
How do we access view state value of this page in the next page?
Explain the difference between AutoPostBack and IspostBack in ASP.NET?
Can we set which type of comparison we want to perform by the CompareValidator control?
Explain transparent caching with aop?
How does session authentication work?
How asynchronous call can be implemented using delegates?
What are the Types of state management techniques
What is autopostback in dropdownlist in asp net?
What is microsoft windows sharepoint services?
Explain difference between friend and protected friend?
Describe the master page.
Why web api is better than wcf?
What is the difference between custom web user control and a custom web server control?