how to match a url non greedy
I am hoping that someone can help开发者_Go百科 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
Try the following:
.match(/(<a\s+.*?href="(.*?)".*?>/)/ig);
精彩评论