Answers for "extract url reg expression js"

1

url regex javascript

// If you also need to check for HTTP or HTTPS

https?://(www.)?[-a-zA-Z0-9@:%._+~#=]{1,256}.[a-zA-Z0-9()]{1,6}b([-a-zA-Z0-9()@:%_+.~#?&//=]*)
Posted by: Guest on January-06-2021
0

javascript regex extract url from string

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);
Posted by: Guest on December-05-2020

Browse Popular Code Answers by Language