Fix NoSpecialCharactersExceptHyphenAndUmlautsRegex not matching any special characters

This commit is contained in:
pcjones
2024-05-15 20:40:18 +02:00
parent a4abb31ea1
commit b44c294782

View File

@@ -99,7 +99,7 @@ namespace UmlautAdaptarr.Utilities
{ {
if (removeUmlauts) if (removeUmlauts)
{ {
return NoSpecialCharactersExceptHypenRegex().Replace(text, ""); return NoSpecialCharactersExceptHyphenRegex().Replace(text, "");
} }
else else
{ {
@@ -157,9 +157,9 @@ namespace UmlautAdaptarr.Utilities
} }
[GeneratedRegex("[^a-zA-Z0-9 -]+", RegexOptions.Compiled)] [GeneratedRegex("[^a-zA-Z0-9 -]+", RegexOptions.Compiled)]
private static partial Regex NoSpecialCharactersExceptHypenRegex(); private static partial Regex NoSpecialCharactersExceptHyphenRegex();
[GeneratedRegex("[^a-zA-Z0-9 -öäüßÖÄÜß]+", RegexOptions.Compiled)] [GeneratedRegex("[^a-zA-Z0-9 öäüßÖÄÜß-]+", RegexOptions.Compiled)]
private static partial Regex NoSpecialCharactersExceptHyphenAndUmlautsRegex(); private static partial Regex NoSpecialCharactersExceptHyphenAndUmlautsRegex();
[GeneratedRegex(@"\s+")] [GeneratedRegex(@"\s+")]