From 822f97de4dd07ca9b0a68351b3ed0a5cba99e689 Mon Sep 17 00:00:00 2001 From: Kai Vogelgesang Date: Tue, 11 Oct 2022 14:00:26 +0200 Subject: [PATCH] Fix regex --- src/partyApi.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/partyApi.ts b/src/partyApi.ts index f6456e7..0b92dd4 100644 --- a/src/partyApi.ts +++ b/src/partyApi.ts @@ -1,7 +1,7 @@ import { APIEndPoint, PartyStatus, SelfStatus } from "./PartyContext"; export const parseURI = (uri: string): APIEndPoint | undefined => { - const x = uri.match(/https?:\/\/(?.+)\.(?.+)\/(?.+)/); + const x = uri.match(/https?:\/\/(?\w+)\.(?.+)\/(?.+)/); if (x === null || x.groups === undefined) return; const partyName = x.groups["partyName"]; const token = x.groups["token"];