vscode Use a regular expression in VS Code's find/replace to replace && with JavaScript's optional chaining In December 2019, optional chaining went to TC39 stage 4. Here is a regular expression to replace most instances of foo && foo.bar and baz && baz() with optional chaining.