JSLint reports “Insecure ^” for my regex — what does that mean?

前端 未结 3 1936

I\'m trying to get my Javascript code 100% JSLint clean.

I\'ve got a regular expression:

 linkRgx = /https?:\\/\\/[^\\s;|\\\\*\'\"!,()<>]+/g;
<         


        
3条回答
  •  情深已故
    2020-11-29 12:09

    You should use:

    /*jslint regexp: true*/
    linkRgx = /https?:\/\/[^\s;|\\*'"!,()<>]+/g;
    /*jslint regexp: false*/
    

提交回复
热议问题