<PackageReference Include="NUnit" Version="4.3.2" />

NUnit.Framework.Constraints.RegexConstraint

public class RegexConstraint : Constraint
RegexConstraint can test whether a string matches the pattern provided.
namespace NUnit.Framework.Constraints { public class RegexConstraint : Constraint { public RegexConstraint IgnoreCase { get; } public RegexConstraint(string pattern); public RegexConstraint(Regex regex); } }