Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function pUrl(e) {
- try {
- /*var n = /^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/
- ,
- r = ["source", "protocol", "authority", "userInfo", "user", "password", "host", "port", "relative", "path", "directory", "file", "query", "anchor"];
- var i = e.indexOf("[")
- , o = e.indexOf("]");
- -1 != i && -1 != o && (e = e.substring(0, i) + e.substring(i, o).replace(/:/g, ";") + e.substring(o, e.length));
- for (var a = n.exec(e || ""), s = {}, c = 14; c--;)
- s[r[c]] = a[c] || "";*/
- const n1 = /^.+\/(?:TIP_ALERT)\/([0-9a-z\-]+)\//gm;
- let m;
- while ((m = n1.exec(e)) !== null) {
- if (m.index === n1.lastIndex) {
- n1.lastIndex++;
- }
- return m[1];
- }
- throw new Error("no match");
- } catch (error) {
- console.error(error);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement