tags:

views:

26

answers:

1

Hi There

I am hoping that someone can help me to make this match non greedy... I am using Javascript and ASP Classic

.match(/(<a\s+.*?><\/a>)/ig);

The purpose is to extract URL's from a page in this format <a href ></a>

I need to capture just the url

Thanks

+1  A: 

Try the following:

.match(/(<a\s+.*?href="(.*?)".*?>/)/ig);
Josiah
match(/href="(.*?)"/ig, ''); <<< I have derived this from your idea... Thanks a million it now captures href="domainname.com" just what I needed!
Gerald Ferreira
Glad to help :)
Josiah