Regular Expression to extract hyperlinks containing keyword

I need a regular expression that can be used in VB6, that extracts a hyperlink / URL from a html page or .txt document.  I need it to extraxt only links that contain a certain keyword or phrase, example: 'foo'
Who is Participating?
i think something like this
(http://[^ ]*foo[^ ]*)

Open in new window

greg_whiteAuthor Commented:
That's close...

It's stopping only when it finds a space:
Example it catches this whole piece instead of stopping at the second quotes."/>

In place of the quote could we put \"...

Well I tried that and it works...

try this
(http://[^ "]*foo[^ "]*)

Open in new window

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.