regex: creating an exception for r:a.?b.?c

后端 未结 2 1583
日久生厌
日久生厌 2021-01-22 15:13

I need to create a regex expression that will filter any variant of \"kitchen\" that has between 0 and 1 random characters between any of the letters, but it needs to make an ex

2条回答
  •  旧时难觅i
    2021-01-22 15:45

    You can do a lookahead to make sure the string is not exactly 'kitchen'

    r:(?!kitchen)k.?i.?t.?c.?h.?e.?n
    

    DEMO

提交回复
热议问题