I am looking for it about 2 hours, but can not find what I need.
what I need is very simple:
- allow: google.com, http://google.com, https://google.com
- disallow spaces "goo gle.com"
- with a valid domain: I mean it should have a dot "." + any domain (.com, .net etc.)
- and allow anything after that: "googl.com/dsfsdf/sdfs/blablahblah/" without spaces
thanks
Edit: Thanks all, I had to write it myself.
if (!/^((ftp|http|https):\/\/)?([a-z0-9_\.-]+)\.{1}([a-z0-9_\/\?\=\-\%-]+)$/.test(uri)
|| /([\._\/\?\=\-\%-])\1/.test(uri)) {
}
ps: I am noob in regexs.