From 287f72b6adc8fb84a677377e325184e6a68d4ce9 Mon Sep 17 00:00:00 2001 From: defnotken Date: Thu, 13 Nov 2025 08:21:37 -0600 Subject: [PATCH] revert regex --- .../LightlessSyncServices/Discord/MareWizardModule.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/LightlessSyncServer/LightlessSyncServices/Discord/MareWizardModule.cs b/LightlessSyncServer/LightlessSyncServices/Discord/MareWizardModule.cs index 5f46000..558403d 100644 --- a/LightlessSyncServer/LightlessSyncServices/Discord/MareWizardModule.cs +++ b/LightlessSyncServer/LightlessSyncServices/Discord/MareWizardModule.cs @@ -329,11 +329,13 @@ 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{8})/?$"); + 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; - var stringId = matches.Groups[2].ToString(); + + lodestoneUrl = matches.Groups[0].ToString(); + var stringId = lodestoneUrl.Split('/', StringSplitOptions.RemoveEmptyEntries).Last(); if (!int.TryParse(stringId, out int lodestoneId)) {