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


Please Help Members By Posting Answers For Below Questions

What kind of data we can store in viewstate?

574


Why is asp.net so popular?

509


What are Authentication and Authorization?

602


What's the use of response.output.write()?

758


i have 3+ exp in .net? i am going interview now but they asked me do you know any TOOL? which tool will i study please refer me?

1836






Where code pages are used?

690


Which platform does Microsoft .NET use for exchanging data between applications?

582


Explain diff. Between friend and protected friend?

496


What are session and cookies?

532


What is authentication in asp.net?

564


How can you dynamically add user controls to a page?

509


What is marshalling ? Is it a part of asp.net ?

614


How we can force all the validation controls to run?

525


How do you use viewstate?

552


Which library is used by the testers and developers to develop automated tests and create testing tools?

540