Regex with exception of particular words

前端 未结 6 1382
伪装坚强ぢ
伪装坚强ぢ 2021-01-12 03:45

I have problem with regex. I need to make regex with an exception of a set of specified words, for example: apple, orange, juice. and given these words, it will match everyt

6条回答
  •  北海茫月
    2021-01-12 04:26

    This gets some of the way there:

    ((?:apple|orange|juice)\S)|(\S(?:apple|orange|juice))|(\S(?:apple|orange|juice)\S)
    

提交回复
热议问题