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:
@@ -329,7 +329,7 @@ public partial class LightlessWizardModule : InteractionModuleBase
|
|||||||
|
|
||||||
private int? ParseCharacterIdFromLodestoneUrl(string lodestoneUrl)
|
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 matches = regex.Match(lodestoneUrl);
|
||||||
var isLodestoneUrl = matches.Success;
|
var isLodestoneUrl = matches.Success;
|
||||||
if (!isLodestoneUrl || matches.Groups.Count < 1) return null;
|
if (!isLodestoneUrl || matches.Groups.Count < 1) return null;
|
||||||
|
|||||||
Reference in New Issue
Block a user