Format:
Recent snippets matching tags of utility
//Generate an object like "window.location"(href,protocol,host,hostname,port,pathname,search,hash) //Or return false function fnConvertHref(href) { var pattern = /([a-z]+):\/\/([^\/:]+):?([\d]*)\/?([^?]*)\??([^#]*)#?([^#]*)/gi; if (pattern.test(href)) { return { 'href' : href, 'protocal' : RegExp.$1, 'host' : RegExp.$2 + RegExp.$3,
261 Views
no comments
Subscribe
Discuss
What's new
What is it
New Snippet
Recent Snippets
My Snippets
Web Code
Search
