C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !




Creation of Groups and using Group classes


Posted Date: 18 Jun 2007    Resource Type: Code Snippets    Category: ADO.NET

Posted By: Abhishek Arya       Member Level: Diamond
Rating:     Points: 10



This method will show you how to use Group and Group Class in Ip address


string strText="212.56.87.23 Dotnetspider.com";

Regex oRegex=new Regex(@"(?(\d|\.)+)\s"+@"(?\S+)");

MatchCollection oMatchCollection=oRegex.Matches(strText);

foreach(Match oMatch in oMatchCollection)
{

Console.WriteLine("IP: "+oMatch.Groups["IP_ADDRESS"]);
Console.WriteLine("URL: "+oMatch.Groups["URL"]);
}




/*
*
will print to the screen

IP: 212.56.87.23
URL: dotnetspider.com

*/




Responses


No responses found. Be the first to respond and make money from revenue sharing program.

Feedbacks      
Popular Tags   What are tags ?   Search Tags  
(No tags found.)

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: How to get the available RAM and the CPU usage?
Previous Resource: How to find out the nth highest number in a database column
Return to Discussion Resource Index
Post New Resource
Category: ADO.NET


Post resources and earn money!
 
Related Resources



dotNet Slackers   BizTalk Adaptors    Web Design

email fax service

Contact Us    Privacy Policy    Terms Of Use