About: Validating a URL   Sponge Permalink

An Entity of Type : owl:Thing, within Data Space : dbkwik.org associated with source dataset(s)

This function validates a URL using regular expressions. You can specify the prefixRequired parameter (set it to true) to force the function to only accept URLs starting with http://, https://, or ftp://, otherwise this prefix will be optional. function isUrl(str, prefixRequired) {strExp = '^(((http(s?))|(ftp))\:\/\/)'; if (arguments.length == 1 && arguments[1] != false) strExp += '?'; strExp += '(www.|[a-zA-Z].)[a-zA-Z0-9\-\.]+\.(\.[a-z]{2,4})' + '(\:[0-9]+)*(\/($|[a-zA-Z0-9\.\,\;\?\'\\\+&%\$#\=~_\-]+))*$'; objRegExp = new RegExp(strExp); return objRegExp.test(str); }

AttributesValues
rdfs:label
  • Validating a URL
rdfs:comment
  • This function validates a URL using regular expressions. You can specify the prefixRequired parameter (set it to true) to force the function to only accept URLs starting with <a href="http://,">http://,</a> https://, or ftp://, otherwise this prefix will be optional. function isUrl(str, prefixRequired) {strExp = '^(((http(s?))|(ftp))\:\/\/)'; if (arguments.length == 1 && arguments[1] != false) strExp += '?'; strExp += '(www.|[a-zA-Z].)[a-zA-Z0-9\-\.]+\.(\.[a-z]{2,4})' + '(\:[0-9]+)*(\/($|[a-zA-Z0-9\.\,\;\?\'\\\+&%\$#\=~_\-]+))*$'; objRegExp = new RegExp(strExp); return objRegExp.test(str); }
dcterms:subject
abstract
  • This function validates a URL using regular expressions. You can specify the prefixRequired parameter (set it to true) to force the function to only accept URLs starting with <a href="http://,">http://,</a> https://, or ftp://, otherwise this prefix will be optional. function isUrl(str, prefixRequired) {strExp = '^(((http(s?))|(ftp))\:\/\/)'; if (arguments.length == 1 && arguments[1] != false) strExp += '?'; strExp += '(www.|[a-zA-Z].)[a-zA-Z0-9\-\.]+\.(\.[a-z]{2,4})' + '(\:[0-9]+)*(\/($|[a-zA-Z0-9\.\,\;\?\'\\\+&%\$#\=~_\-]+))*$'; objRegExp = new RegExp(strExp); return objRegExp.test(str); }
Alternative Linked Data Views: ODE     Raw Data in: CXML | CSV | RDF ( N-Triples N3/Turtle JSON XML ) | OData ( Atom JSON ) | Microdata ( JSON HTML) | JSON-LD    About   
This material is Open Knowledge   W3C Semantic Web Technology [RDF Data] Valid XHTML + RDFa
OpenLink Virtuoso version 07.20.3217, on Linux (x86_64-pc-linux-gnu), Standard Edition
Data on this page belongs to its respective rights holders.
Virtuoso Faceted Browser Copyright © 2009-2012 OpenLink Software