Regex: what does (?! …) mean?

前端 未结 6 1569
既然无缘
既然无缘 2021-02-12 21:46

The following regex finds text between substrings FTW and ODP.

/FTW(((?!FTW|ODP).)+)ODP+/

What does the (?!...) do?

6条回答
  •  温柔的废话
    2021-02-12 22:44

    '?!' is actually part of '(?! ... )', it means whatever is inside must NOT match at that location.

提交回复
热议问题