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
Suppose You Want A Certain Asp.net Function Executed On Mouseover For A Certain Button. Where Do You Add An Event Handler?
Which property needs to be set for script manager control to extend the time before throwing time out expection if no response is received from the server?
What are different types of authentication techniques that are used in connection strings to connect .net applications with microsoft sql server?
Is asp.net core faster?
What is the parent class of all the web server control?
Explain about the .NET framework?
Is asp.net mvc still used? : Asp.Net MVC
Can I read the hard disk serial # of the client computer using asp.net?
Can you change a master page dynamically at runtime? How?
What is the appSettings Section in the web.config file?
What is ispostback property?
What is the difference between table and query?
What is difference between cache and session?
What is authorization in asp.net?
What is asp.net with mvc? : Asp.Net MVC