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


Please Help Members By Posting Answers For Below Questions

If you want to bind the columns manually within the asp:datagrid tags what kind of tags you have to add.

621


What is use of <% %> in asp.net?

548


Where would you use an ihttpmodule, and what are the limitations of any?

549


What parameters can you pass in the url of the api?

661


What is _dopostback in asp net?

530






What types of data validation events are commonly seen in the client-side form validation?

562


How can you make sure that web api returns json data only?

518


Explain asp.net application life cycle?

548


What is session mode in asp.net?

520


Describe the differences between the lifecycles of Windows services and Standard EXE?

599


If Instancing = Single use for ActiveX Exe, how will this be executed if there are 2 consecutive client requests ?

1976


What are the data controls available in asp.net?

508


Will the asp.net validators run in server side or client side? How do you do client-side validation in .net? How to disable validator control by client side javascript?

529


Which property is used to identify the Page is Post Back in ASP.NET?

557


benefits of migration from asp to asp.net hi frnds, i have to give presentation to a client about how useful would be migrating their project from asp to asp.net .plz give me some points which i should incorporate in my ppt thanks

1775