TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
TJ
NA
3
0
Regex.split by a spceial ip address pattern?
Feb 24 2010 2:48 PM
I could really use some assistance on this.
I'm attempting to perform a Regex.split() on a large string. The delimiter I've decided would return the most ideal result is IP address. However, it appears in two different forms. One form of the IP is preceded by a specific string, the other does not. The latter is what I need to use as the delimiter.
So, I need to exclude the IP address sequence which DOES include the preceding string. Here is my current regex pattern:
string ip_address_pattern = @"(?<!job-identifier)((?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?):?[0-9][0-9][0-9][0-9][0-9]?";
The preceding string I need to look for is: job-identifier = "
That's 'job-identifier' followed by a space, an equal, another space and a quote.
Can someone tell me what I'm doing wrong?
Reply
Answers (
2
)
how to create a bloging application
How intranet process work in office