for JS
regular expression to validate any http
|https
|ftp
|IPv4
address,
supported:
username:password
(example https://username:password@example.com
);:0-65565
(example https://example.com:80
);?c=1 or ?c=1&d=x
(example https://example.com/main.php?c=1&d=x
);#name
(example https://example.com/main.php#top
);*
] (example https://web.archive.org/web/*/http://cdn.lijit.com/*
);