📌  相关文章
📜  javascript regex 从字符串中提取 url - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:47.293000             🧑  作者: Mango

代码示例1
var urlRegex = /(https?:\/\/[^ ]*)/;

var input = "https://medium.com/aspen-ideas/there-s-no-blueprint-26f6a2fbb99c random stuff sd";
var url = input.match(urlRegex)[1];
alert(url);