Find: ^.*?console\.(warn|info|log|error|exception).*?$
Replace with: ``
Last active
November 14, 2017 23:49
-
-
Save Noitidart/9444208 to your computer and use it in GitHub Desktop.
regex pattern for release
Find:
^.*?console\.(warn|info|log|error|exception|time|timeEnd|jsm).*?$
Replace with: ``
vscode
(^)(.?console.(?:warn|info|log|error|exception|time|timeEnd|jsm).?)($)
$1//$2$3
vscode
remove them
(^)//(\s*?)// console
$1$2console
(^)//(\s*?console)
$1$2
// add it back:
(^)[^/](.*?console.)
$1//$2
submlime
add slashes (comment out console
's)
find:
(^)(\s*?)console
replace with:
$1$2// console
vscode
remove all console. lines:
.*?console.*
replace with: ``
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
code to run on replace all. puts comment before each one:
Find what:
(.*?)console\.(warn|info|log|error)
Replace with:
$1//console.$2