Regular Expression to exclude set of Keywords

后端 未结 7 1739
一个人的身影
一个人的身影 2020-11-30 22:54

I want an expression that will fail when it encounters words such as \"boon.ini\" and \"http\". The goal would be to take this expression and be able to construct for any se

7条回答
  •  被撕碎了的回忆
    2020-11-30 23:28

    ^(?:(?!boon\.ini|http).)*$\r?\n?
    

    (taken from RegexBuddy's library) will match any line that does not contain boon.ini and/or http. Is that what you wanted?

提交回复
热议问题