showing results for - "javascript regex extract url from string"
Andrea
12 Jan 2021
1var urlRegex = /(https?:\/\/[^ ]*)/;
2
3var input = "https://medium.com/aspen-ideas/there-s-no-blueprint-26f6a2fbb99c random stuff sd";
4var url = input.match(urlRegex)[1];
5alert(url);