Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Correct regex for extracting URl

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);
 Run code snippet
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Correct #regex #extracting #URl
ADD COMMENT
Topic
Name
2+4 =