JSFiddle - React, Tailwind, and code Playground
by aflynt
JavaScript
// determine if it is a string
var test_string = "http://lfach.convio.net/site/TR/WTELN/LFAGeorgiaChapter?team_id=1694&pg=team&fr_id=1071";
var isURL = /[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,4}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/i.test(test_string);
var hasSpaces = /\s/i.test(test_string);
if (isURL && !hasSpaces) {
console.log("Not salty");
}
else {
console.log("There is no space beween the string");
}