RegExp to find JS & Angular non-comment logs


/ Published in: Regular Expression
Save to your folder(s)

Regular Expression to find native Javascript console and AngularJS $log log warn or info that are NOT comments / commented out


Copy this code and paste it in your HTML
  1. /^(\s*)?[^\/]{0,2}((\$log|console)\.(warn|log|info))(.*)$/gmi
  2.  
  3. in Sublime Text: ^(\s*)?[^\/]{0,2}(\$log\.(warn|log|info))(.*)$
  4.  
  5. test/play here: http://refiddle.com/refiddles/js-and-angular-non-comment-logs

URL: http://refiddle.com/refiddles/js-and-angular-non-comment-logs

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.