Fix regex
This commit is contained in:
parent
ac757fd322
commit
822f97de4d
@ -1,7 +1,7 @@
|
||||
import { APIEndPoint, PartyStatus, SelfStatus } from "./PartyContext";
|
||||
|
||||
export const parseURI = (uri: string): APIEndPoint | undefined => {
|
||||
const x = uri.match(/https?:\/\/(?<partyName>.+)\.(?<host>.+)\/(?<token>.+)/);
|
||||
const x = uri.match(/https?:\/\/(?<partyName>\w+)\.(?<host>.+)\/(?<token>.+)/);
|
||||
if (x === null || x.groups === undefined) return;
|
||||
const partyName = x.groups["partyName"];
|
||||
const token = x.groups["token"];
|
||||
|
Loading…
Reference in New Issue
Block a user