void () { doUrlTest("not detecting jetbrains.com", null); doUrlTest("mailto:admin@jetbrains.com;", "mailto:admin@jetbrains.com"); doUrlTest("news://jetbrains.com is good", "news://jetbrains.com"); doUrlTest("see http://www.jetbrains.com", "http://www.jetbrains.com"); doUrlTest("https://www.jetbrains.com;", "https://www.jetbrains.com"); doUrlTest("(ftp://jetbrains.com)", "ftp://jetbrains.com"); doUrlTest("[ftps://jetbrains.com]", "ftps://jetbrains.com"); doUrlTest("Is it good site:http://jetbrains.com?", "http://jetbrains.com"); doUrlTest("And http://jetbrains.com?a=@#/%?=~_|!:,.;&b=20,", "http://jetbrains.com?a=@#/%?=~_|!:,.;&b=20"); doUrlTest("site:www.jetbrains.com.", "www.jetbrains.com"); doUrlTest("site (www.jetbrains.com)", "www.jetbrains.com"); doUrlTest("site [www.jetbrains.com]", "www.jetbrains.com"); doUrlTest("site <www.jetbrains.com>", "www.jetbrains.com"); doUrlTest("site {www.jetbrains.com}", "www.jetbrains.com"); doUrlTest("site 'www.jetbrains.com'", "www.jetbrains.com"); doUrlTest("site \"www.jetbrains.com\"", "www.jetbrains.com"); doUrlTest("site=www.jetbrains.com!", "www.jetbrains.com"); doUrlTest("site *www.jetbrains.com*", "www.jetbrains.com"); doUrlTest("site `www.jetbrains.com`", "www.jetbrains.com"); doUrlTest("not a site _www.jetbrains.com", null); doUrlTest("not a site 1www.jetbrains.com", null); doUrlTest("not a site wwww.jetbrains.com", null); doUrlTest("not a site xxx.www.jetbrains.com", null); doUrlTest("site https://code.angularjs.org/1.4.3/docs/api/ng/service/$http#usage", "https://code.angularjs.org/1.4.3/docs/api/ng/service/$http#usage"); }