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)

Answers were Sorted based on User's Feedback



From the given paragraph of text, write a program to match the strings of format “Any number of ..

Answer / 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

From the given paragraph of text, write a program to match the strings of format “Any number of ..

Answer / raghuram

both the above answers are wrong....... Reg Exp should say..

new Regex("[0-9]*_[A-Za-z]*");

^ and $ mean beginning and end of a line... and the question
is to select that particular combination no matter where
they are present...... need not be entire line.

Is This Answer Correct ?    5 Yes 0 No

From the given paragraph of text, write a program to match the strings of format “Any number of ..

Answer / 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

From the given paragraph of text, write a program to match the strings of format “Any number of ..

Answer / pio

Raghuram is right and his regex is 100% correct. The other
2 answers also have a string which does nothing:

string s = input;

so it is not necessary.

Is This Answer Correct ?    1 Yes 1 No

Post New Answer

More ASP.NET Interview Questions

How connect data into DropDownList from Aceess Table?

1 Answers   HCL, TCS,


Which template must you provide, in order to display data in a Repeater control?

1 Answers  


which is best possible way to add data source to data grid when the data is huge(10 lack recored)how to edit a perticular row

3 Answers   Airtel, Aviva,


1. What is Connection Pooling…? 2. Maintaining Sessions in ASP.NET 3. ASP.NET page lifecycle. 4. Can we store objects in sessions. 5. What is AJAX..? 6. Serialization/Deserialization. Why we use serialization and Deserialization…? 7. What are Arrays and Arraylist..? 8. Difference between Authentication and Authorization…? 9. Difference between abstract class and Interfaces 10. What is a view..? Does a view contain data..? 11. What are triggers..? 12. What are transactions..? 13. What is Metaview (oracle)..? 14. What is Inheritance..? How can we call a method from the base class..? 15. Can an abstract class have zero abstract methods..? 16. How to read from Message Queue..? 17. What is Metadata..? 18. You would prefer to have business logic in c# or DB Side..? Why…?

1 Answers   Franklin Templeton, Sky InfoTech,


Authentication and Authorization

2 Answers   Syntel,


How we generate the BARCODE in ASP.Net using c# ! in library management systen for books .

2 Answers  


What are sessions used for?

0 Answers  


what is <location> tag?

2 Answers  


What are Caching techniques in .NET

0 Answers   Microsoft,


What does asp stand for in asp.net?

0 Answers  


What is state management react?

0 Answers  


What methods are fired during the page load?

1 Answers  


Categories