Skip to content

Instantly share code, notes, and snippets.

@saw
Created April 13, 2010 18:06
Show Gist options
  • Save saw/364897 to your computer and use it in GitHub Desktop.
Save saw/364897 to your computer and use it in GitHub Desktop.
var v = new RegExp();
v.compile("^[A-Za-z]+://[A-Za-z0-9-_]+\\.[A-Za-z0-9-_%&\?\/.=]+$");
if (!v.test(url)) {
return false;
}
return true;
@saw
Copy link
Author

saw commented Apr 13, 2010

I didn't write this. But someone did. And they were serious.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment