Advertisement
0demongamer0

Untitled

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