Files
FileFlowsPlugins/BasicNodes/Helpers/GeneralHelper.cs
2024-04-15 19:22:02 +12:00

17 lines
511 B
C#

namespace FileFlows.BasicNodes.Helpers;
/// <summary>
/// General helper
/// </summary>
public class GeneralHelper
{
/// <summary>
/// Checks if the input string represents a regular expression.
/// </summary>
/// <param name="input">The input string to check.</param>
/// <returns>True if the input is a regular expression, otherwise false.</returns>
public static bool IsRegex(string input)
{
return new[] { "?", "|", "^", "$", "*" }.Any(ch => input.Contains(ch));
}
}