1
0
Fork 0
mirror of https://github.com/Nioux/AideDeJeu.git synced 2025-12-22 10:03:41 +00:00

Contenu + subname

This commit is contained in:
Yan Maniez 2018-08-15 10:02:44 +02:00
parent facc95fa00
commit 5c1bdda78b
2 changed files with 84 additions and 1 deletions

View file

@ -15,7 +15,14 @@ namespace AideDeJeuLib
{
var regex = new Regex("\\[(?<text>.*?)\\]");
var match = regex.Match(AltName ?? string.Empty);
return match.Groups["text"].Value;
if (!string.IsNullOrEmpty(match.Groups["text"].Value))
{
return match.Groups["text"].Value;
}
else
{
return AltName ?? string.Empty;
}
}
}