Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

What are resource file and how do we generate resource file?

925


Where is asp.net session stored?

887


What is the basic difference between asp and asp.net?

965


How can you enable impersonation in the web.config file?

1086


Describe a Windows Service and its lifecycle ?

1078


How do u declare static variable and how it is declared and what is its lifetime?

973


Elaborate differentiation between ViewState and SessionState?

1031


How can you use a custom controls in ASP.NET application?

954


To load your generated dataset with data which method do you invoke?

1053


Explain the difference between the web config and machine config.

973


What is loop in asp.net?

1028


Can asp.net work on an nt server?

978


Can the unique key be null?

1025


Less than one page, how many windows will you be able to maintain?

931


What is the difference between response.redirect and server.transfer?

971