Regex Substring Question

I am parsing a specific web page for IP address information using the following expression to find an IP address - which always start a given line:


By itself, this works without any issues - but I need the entire line and the line can be ended by a line break or a closing tag (i.e. </tr>, </div>, </p>, </li>, etc...).  I have tried using groups but nothing I am doing is working.  For example, if the above expression is called IPMatch, I tried:


This ends up finding the first IP address and then returning the entire page after that point.  Can somebody please help?
Who is Participating?
Terry WoodsConnect With a Mentor IT GuruCommented:
Or try:

Open in new window

If you don't have nested tags that you need to include, you could just take all characters up to <, something like this:

ktolaAuthor Commented:
That works perfectly - thank you!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.