[Filter] Wasn't using the right straw

This commit is contained in:
Matt Nadareski
2017-02-08 20:47:18 -08:00
parent 459c732217
commit 6edaf6e709

View File

@@ -481,7 +481,7 @@ namespace SabreTools.Helper.Dats
string regexStraw = (!regex ? "^" + (straw.StartsWith("*") ? ".*" : "") + Regex.Escape(straw.Trim('*')) + (straw.EndsWith("*") ? ".*" : "") + "$" : straw); string regexStraw = (!regex ? "^" + (straw.StartsWith("*") ? ".*" : "") + Regex.Escape(straw.Trim('*')) + (straw.EndsWith("*") ? ".*" : "") + "$" : straw);
// Check if a match is found with the regex // Check if a match is found with the regex
found |= Regex.IsMatch(needle, straw, RegexOptions.IgnoreCase); found |= Regex.IsMatch(needle, regexStraw, RegexOptions.IgnoreCase);
} }
} }