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
Why is global asax is used?
What is asp short for?
Where is the view state data stored?
Explain what is the procedure to create the environment for asp.net? : asp.net mvc
How can you enable impersonation in the web.config file?
What is use of Master Page in ASP.NET web pages?
Define asp.net caching?
What is csrf attack in asp.net?
What is a server farm in iis?
What are the security types in ASP/ASP.NET? Different Authentication modes?
In ViewState How much lifespan items stored?
What is an il?
What is meant by server side scripting?
Explain server-side scripting and client-side scripting.
What are the asp.net list controls and difference between them?