fix(math): bound fraction regex execution

This commit is contained in:
aj
2026-09-29 21:41:20 -04:00
parent 3bdefb1d1c
commit 388816b015
2 changed files with 102 additions and 1 deletions
+3 -1
View File
@@ -8,7 +8,9 @@ namespace OpenNest.Math
public static class Fraction
{
public static readonly Regex FractionRegex = new Regex(
@"((?<WholeNum>\d+)(\ |-))?(?<Fraction>\d+\/\d+)"
@"((?<WholeNum>\d+)(\ |-))?(?<Fraction>\d+\/\d+)",
RegexOptions.None,
TimeSpan.FromMilliseconds(250)
);
public static bool IsValid(string s)