-
-
Save jarridlima/965022c848c37919664a47a83c034459 to your computer and use it in GitHub Desktop.
Revisions
-
jarridlima created this gist
Jan 23, 2020 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,20 @@ let patternUrl = /^(?:http(s)?:\/\/)?[\w.-]+(?:\.[\w\.-]+)+[\w\-\._~:/?#[\]@!\$&'\(\)\*\+,;=.]+$/ // source: https://www.regextester.com/94502 // =============================== // Test strings: // =============================== // https://www.example.com // http://www.example.com // www.example.com // example.com // http://blog.example.com // http://www.example.com/product // http://www.example.com/products?id=1&page=2 // http://www.example.com#up // http://255.255.255.255 // 255.255.255.255 // http://www.site.com:8008 // INVALID => http://invalid.com/perl.cgi?key= | http://web-site.com/cgi-bin/perl.cgi?key1=value1&key2