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
How many types of state management are there in asp net?
What is virtual directory in asp.net?
What is query string?
Is it possible to migrate visual interdev design-time controls to asp.net?
How do you secure your configuration files to be accessed remotely by unauthorized users?
What is a web based system?
What is the request flow used for asp.net mvc framework? : asp.net mvc
What is the full form of asp.net?
What is Model-View-View Model?
What is the use of session in web application?
What is the function used for removing an event listener?
What is ASLM?
What are the best practices to follow to secure connection strings in an ASP.NET web application?
What is web api and why to use it?
How can you register a custom server control to a web page?