A simpler expression should do the trick:
var str = "https://web.archive.org/web/20030328195612/https://www.iskme.org:80/";
var url = str.match(/.*(https?:.*)/)[1];
The first .*
will consume as many characters as possible up until the last occurrence of http(s):
in the search string.
4
solved Javascript regex: issue when trying to parse both http and https instances of a natively archived string URL [closed]