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
How does u call and execute a sp in .net?
Hi All, Im an MCA holder with 3+ years of experience in asp.net. Now i want to move to some good government job. I have no idea about different categories of exams held & which one can be applicable for my education background. I have done B.A with MCA. Please help me out with your valuable suggestions. I would be very grateful. Thanks Anuj
What tags do you need to add within the asp:datagrid tags to bind columns manually? How?
How does the iis work?
What is the difference between GridView and Repeater controls in ASP.NET?
What is css in asp.net?
Is a dll file an executable?
Can you explain composite pattern?
Which is better php or asp.net?
What is a web api endpoint?
How do you identify that the page is postback?
What are the difference between function and stored procedure in .net programming language?
What are themes and skins in 2.0, explain usage scenario?
Describe in brief .net framework and its components.
Describe the events in the life cycle of a web application.