Regex - how to exclude single word?

后端 未结 3 739
再見小時候
再見小時候 2020-12-07 23:13

I am using http://www.position-absolute.com/articles/jquery-form-validator-because-form-validation-is-a-mess/ for validation. Validation rules are defined in a following way

3条回答
  •  不思量自难忘°
    2020-12-07 23:52

    It's unclear from your question what you want, but I've interpreted it as "not matching input that contains a particular word". The regex for this is:

    ^(?!.*\bexclude_word\b)
    

提交回复
热议问题