JSFiddle - React, Tailwind, and code Playground

HTML

<b>Matches?</b><div id='results'></div>

CSS

b{color:blue;}

JavaScript

var values = ['html5shiv.js', 'http://ajax.googleapis.com/html5shiv.js&q=test%25test','blah']

var regex = /^(\w+:\/\/[\w\._~:/?#\[\]@!$&'()*+,;=%]*|[^\.]+\.[^\.]+)$/

for (index in values){
var tmp = values[index].match(regex)
$('#results').append(values[index]+'='+(tmp!=null)+'<br/>')
}