开发者

how to match a url non greedy

开发者 https://www.devze.com 2023-01-07 00:11 出处:网络
I am hoping that someone can help开发者_Go百科 me to make this match non greedy... I am using Javascript and ASP Classic

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

精彩评论

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

关注公众号