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 difference between session and cookies?
Is it possible to write code in many languages in one asp.net project?
What are demand-paging and pre-paging?
How you can add an event handler?
How do we sort the data from a dataset?
What is http response header?
Why is global asax is used for?
What are the security types in asp.net?
Why is string called immutable data type?
What websites use asp.net?
What's the use of response.output.write()?
What are the modes of updation in an updatepanel? What are triggers of an updatepanel?
What are the uses of list view control in Asp.net?
What is difference between viewstate and session state in javascript?
Explain the steps needed to be performed in order to create an animation in xaml?