Updated Lodestone URL regex

Made it match the lodestone URL scheme exactly, with optional trailing "/" and nothing before or after the URL
This commit is contained in:
2025-11-01 22:29:09 +01:00
parent ee69df8081
commit 8e36b062fd

View File

@@ -329,7 +329,7 @@ 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{8}/?$");
var matches = regex.Match(lodestoneUrl);
var isLodestoneUrl = matches.Success;
if (!isLodestoneUrl || matches.Groups.Count < 1) return null;