I have somethink like that:
RuleFor(x =>x.xd != null).NotEmpty(); // I dont want to match this
RuleFor(x =>x.xd != null); // I want to match only this, independently of that, what is in brackets
CodePudding user response:
Try:
^(?!.*\(.*\).*\(.*\)).*;$
(?!.*\(.*\).*\(.*\))
- don't match string where two(.*)
are found.*;$
- match all where the last character is;