i have a script where i use many times the command
console.log(‘anything inside’)
how can i change them with regural expression into visual code or any other editor, to be like this
if(display_comments==true){console.log(‘anything inside’)}
where the "anything inside" and be any phrase.
>Solution :
You can use search and replace with the following search:
console.log\('(.*)'\)
And replace with:
if(display_comments==true){console.log('$1')}
Don’t forget to enable "Use regular expression" toggle next to the search input.