Require at least one digit in regex.
This commit is contained in:
parent
9b477e461d
commit
f8eafb9073
1 changed files with 1 additions and 1 deletions
|
|
@ -734,7 +734,7 @@ namespace TShockAPI
|
||||||
|
|
||||||
foo = foo.Replace("%map%", Main.worldName);
|
foo = foo.Replace("%map%", Main.worldName);
|
||||||
foo = foo.Replace("%players%", GetPlayers());
|
foo = foo.Replace("%players%", GetPlayers());
|
||||||
Regex reg = new Regex("%\\s*(?<r>\\d{0,3})\\s*,\\s*(?<g>\\d{0,3})\\s*,\\s*(?<b>\\d{0,3})\\s*%");
|
Regex reg = new Regex("%\\s*(?<r>\\d{1,3})\\s*,\\s*(?<g>\\d{1,3})\\s*,\\s*(?<b>\\d{1,3})\\s*%");
|
||||||
var matches = reg.Matches(foo);
|
var matches = reg.Matches(foo);
|
||||||
Color c = Color.White;
|
Color c = Color.White;
|
||||||
foreach (Match match in matches)
|
foreach (Match match in matches)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue