regex pattern to find example url from string [closed]

As Marty says, it all depends on which language you are using.
You could do it in JavaScript, like so:

var myString = "i have a example link:- i need a regex to extact that full url from text string. thanks!";
var myRegexp = /(http|ftp|https):\/\/[\w-]+(\.[\w-]+)+([\w.,@?^=%&:\/~+#-]*[\[email protected]?^=%&\/~+#-])?/
var match = myRegexp.exec(myString);


Here’s a demo

I got the regex from this thread: JavaScript Regex to match a URL in a field of text

Browse More Popular Posts

Leave a Comment