开发者

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);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜