我有很多不同的字符串,其中有些带有单词“ mountain”:
mountain_something_one
mountain_sth_sth_two
big_mountain_sth_three
something_completely_else
除了那些包含单词“ mountain”且不同时包含单词“ one”的字符串之外,我想匹配所有其他字符串。
因此,在上面的示例中,两个字符串将匹配:
mountain_something_one
something_completely_else
我找到了一种称为负面环顾(Regular expression to match a line that doesn't contain a word?)的东西,但我无法使其正常工作。