From 34f0223a850c9a31c90cb2faf32756acd79fb459 Mon Sep 17 00:00:00 2001 From: celine Date: Thu, 13 Nov 2025 15:50:19 +0100 Subject: [PATCH] revert revert regex --- .../LightlessSyncServices/Discord/MareWizardModule.cs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/LightlessSyncServer/LightlessSyncServices/Discord/MareWizardModule.cs b/LightlessSyncServer/LightlessSyncServices/Discord/MareWizardModule.cs index 558403d..eb7007e 100644 --- a/LightlessSyncServer/LightlessSyncServices/Discord/MareWizardModule.cs +++ b/LightlessSyncServer/LightlessSyncServices/Discord/MareWizardModule.cs @@ -329,13 +329,11 @@ public partial class LightlessWizardModule : InteractionModuleBase private int? ParseCharacterIdFromLodestoneUrl(string lodestoneUrl) { - var regex = new Regex(@"https:\/\/(na|eu|de|fr|jp)\.finalfantasyxiv\.com\/lodestone\/character\/\d+"); + var regex = new Regex(@"^https:\/\/(na|eu|de|fr|jp)\.finalfantasyxiv\.com\/lodestone\/character\/(\d+)/?$"); var matches = regex.Match(lodestoneUrl); var isLodestoneUrl = matches.Success; if (!isLodestoneUrl || matches.Groups.Count < 1) return null; - - lodestoneUrl = matches.Groups[0].ToString(); - var stringId = lodestoneUrl.Split('/', StringSplitOptions.RemoveEmptyEntries).Last(); + var stringId = matches.Groups[2].ToString(); if (!int.TryParse(stringId, out int lodestoneId)) {