diff --git a/BasicNodes/Functions/Matches.cs b/BasicNodes/Functions/Matches.cs index 7fea4afd..3a760f02 100644 --- a/BasicNodes/Functions/Matches.cs +++ b/BasicNodes/Functions/Matches.cs @@ -2,8 +2,6 @@ using FileFlows.Plugin; using FileFlows.Plugin.Attributes; using System.ComponentModel.DataAnnotations; using System.Text.RegularExpressions; -using FileFlows.BasicNodes.Helpers; -using FileFlows.Plugin.Helpers; namespace FileFlows.BasicNodes.Functions; @@ -52,26 +50,10 @@ public class Matches : Node value = varValue; else value = args.ReplaceVariables(match.Key, stripMissing: true); - string strValue = value?.ToString()?.Trim() ?? string.Empty; - - args.Logger?.ILog("Testing match value: " + strValue); - - if (Regex.IsMatch(match.Value ??string.Empty, "^(true|1)$", RegexOptions.IgnoreCase) && - Regex.IsMatch(strValue, "^(true|1)$", RegexOptions.IgnoreCase)) - { - args.Logger?.ILog($"Match found '{match.Value}' = {strValue}"); - return output; - } - if (Regex.IsMatch(match.Value ??string.Empty, "^(false|0)$", RegexOptions.IgnoreCase) && - Regex.IsMatch(strValue, "^(false|0)$", RegexOptions.IgnoreCase)) - { - args.Logger?.ILog($"Match found '{match.Value}' = {strValue}"); - return output; - } - if (args.MathHelper.IsMathOperation(match.Value)) { + string strValue = value?.ToString()?.Trim() ?? string.Empty; if (args.MathHelper.IsTrue(match.Value, strValue)) { args.Logger?.ILog($"Match found '{match.Value}' = {strValue}"); @@ -79,7 +61,7 @@ public class Matches : Node } } - if (args.StringHelper.Matches(match.Value, strValue)) + if (args.StringHelper.Matches(match.Value, value)) return output; } catch (Exception) diff --git a/FileFlows.Plugin.dll b/FileFlows.Plugin.dll index fdeb9522..16e40b0d 100644 Binary files a/FileFlows.Plugin.dll and b/FileFlows.Plugin.dll differ diff --git a/FileFlows.Plugin.pdb b/FileFlows.Plugin.pdb index e44b6949..cf76655a 100644 Binary files a/FileFlows.Plugin.pdb and b/FileFlows.Plugin.pdb differ