Regex that matches anything not ending in .json

前端 未结 4 1024
天命终不由人
天命终不由人 2020-12-21 01:03

For a web app I\'m trying to come up with a javascript regex that matches anything not ending in .json. Sounds simple but I\'m finding it pretty damn hard.

4条回答
  •  有刺的猬
    2020-12-21 01:28

    maybe instead of testing "match (not .json)" you could test "not match (.json)", which is easy ?

提交回复
热议问题