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
How does output caching work in ASP.NET?
What tags do you need to add within the asp:datagrid tags to bind columns manually? How?
How to change Master page in ASP.Net using code?
Can I have a unique key as foreign key?
Which property is used to identify the Page is Post Back in ASP.NET?
How do you declare static variable?
If you want to write your own dot net language, what steps you will you take care?
How to use multiple scriptmanager controls in a web page?
What is the advantage of using Windows authentication in a Web application?
How would ASP and ASP.NET applications run at the same time on the same server?
What is the maximum amount of memory any single process on windows can address?
What are the cookies types in asp.net?
What is http pipeline in asp.net?
Does web services support data reader like pom project?
What is the use of session?