Skip to content

Commit 7bb4e48

Browse files
committed
\w includes digits. Who knew.
1 parent 4f0b2d7 commit 7bb4e48

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

SharedLibraryCore/Commands/NativeCommands.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ public override async Task ExecuteAsync(GameEvent gameEvent)
229229
/// </summary>
230230
public class TempBanCommand : Command
231231
{
232-
private static readonly string TempBanRegex = @"^([0-9]{1,5}\w+)\ (.+)";
232+
private static readonly string TempBanRegex = @"^([0-9]{1,5}\p{L}+)\ (.+)";
233233
private readonly ApplicationConfiguration _appConfig;
234234

235235
public TempBanCommand(ApplicationConfiguration appConfig, CommandConfiguration config,

SharedLibraryCore/Utilities.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,7 @@ public static Game GetGame(string gameName)
510510

511511
public static TimeSpan ParseTimespan(this string input)
512512
{
513-
var expressionMatch = Regex.Match(input, @"^([0-9]{1,5})(\w+)");
513+
var expressionMatch = Regex.Match(input, @"^([0-9]{1,5})(\p{L}+)");
514514

515515
if (!expressionMatch.Success) // fallback to default tempban length of 1 hour
516516
{

0 commit comments

Comments
 (0)