From f8eafb9073e673024e8159cb363d8300db0053df Mon Sep 17 00:00:00 2001 From: Zack Piispanen Date: Sun, 10 Nov 2013 08:14:33 -0500 Subject: [PATCH] Require at least one digit in regex. --- TShockAPI/Utils.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TShockAPI/Utils.cs b/TShockAPI/Utils.cs index 16da4470..086570c8 100644 --- a/TShockAPI/Utils.cs +++ b/TShockAPI/Utils.cs @@ -734,7 +734,7 @@ namespace TShockAPI foo = foo.Replace("%map%", Main.worldName); foo = foo.Replace("%players%", GetPlayers()); - Regex reg = new Regex("%\\s*(?\\d{0,3})\\s*,\\s*(?\\d{0,3})\\s*,\\s*(?\\d{0,3})\\s*%"); + Regex reg = new Regex("%\\s*(?\\d{1,3})\\s*,\\s*(?\\d{1,3})\\s*,\\s*(?\\d{1,3})\\s*%"); var matches = reg.Matches(foo); Color c = Color.White; foreach (Match match in matches)