Whitespace was getting escaped

This commit is contained in:
Matt Nadareski
2019-05-23 10:43:02 -07:00
parent 312e8a778c
commit 1f3420a08f

View File

@@ -159,8 +159,8 @@ namespace SabreTools.Library.DatFiles
{
string regexStraw = strawString;
// If the straw has no special characters at all, treat it as an exact match
if (regexStraw == Regex.Escape(regexStraw))
// If the straw has no special characters at all (excluding whitespace), treat it as an exact match
if (regexStraw == Regex.Escape(regexStraw).Replace("\\ ", " "))
regexStraw = "^" + regexStraw + "$";
// Check if a match is found with the regex