Wednesday 8 January 2014

Find Console.log's

Whenever you're developing any sort of JavaScript, it's fairly normal to use console.log's for troubleshooting / development, well you probably don't want those going out into production, luckily you can use a regex in your search to find such rouge statements.



Basically, you want to use a negative lookbehind (?<!) selection to make sure that your console isn't prefixed with a double front slash.