Is it possible to write a regexp rule in "one line" that says: neither A nor B.
For example:
String 开发者_运维知识库must contain NEITHER "foo" NOR "bar".
Why one line? Because the filtering tool I am using accepts only one line ... I have tried things like (.*foo.*){0}(.*bar.*){0}
without enough luck.
^(?!.*(foo|bar)).*$
精彩评论