Reduce string literal length by using verbatim string

This commit is contained in:
Stepan Goremykin
2023-10-08 00:26:12 +02:00
parent 3f9ee316d5
commit 8ea812b65d
11 changed files with 36 additions and 36 deletions

View File

@@ -103,7 +103,7 @@ namespace Jellyfin.Server.Implementations.Users
// This is some regex that matches only on unicode "word" characters, as well as -, _ and @
// In theory this will cut out most if not all 'control' characters which should help minimize any weirdness
// Usernames can contain letters (a-z + whatever else unicode is cool with), numbers (0-9), at-signs (@), dashes (-), underscores (_), apostrophes ('), periods (.) and spaces ( )
[GeneratedRegex("^[\\w\\ \\-'._@]+$")]
[GeneratedRegex(@"^[\w\ \-'._@]+$")]
private static partial Regex ValidUsernameRegex();
/// <inheritdoc/>