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
Explain the benefits of viewstate?
Differences between “dataset” and “datareader”.
How do I open an ashx file in windows 7?
Explain advantages of caching?
What are the types of validation in asp net?
Types of instancing properties and explain each. Tell the difference between multiuse,singleuse and globalmultiuse and which is default ?
Explain difference between dataset and datareader?
What are the advantages and limitations of query string?
To get the values in two different controls to match which control you use it?
Explain what is an assembly?
How to create multi language website in asp.net mvc? : Asp.Net MVC
What is the sequence in which ASP.NET events are processed?
What is query string in asp.net?
What is the importance of Global.asax in ASP.NET?
Explain the difference between debug.write and trace.write?