How-To USE Search-and-Replace Regex in VS Code

Author

Daniel Gorski

CEO

1 Min. Lesezeit

Regex replacement in VS Code

How-To solve usage of implicit 'with' in VS Code (AL0604)

AL(AL0604):
Use of implicit 'with' will be removed in the future.
Qualify with Rec. – this warning will become an error in a future release.


Hey guys,

you might know that VS Code supports usage of search-and-replace with regular expressions?

If you want to know how this reg-ex works, just visit:
https://regex101.com/r/Rx7sPI/4


Open your search dialog with CTRL+H

Use this in your Find field:

(\w*field\(.*; ?)(.*\))

And this in your Replace field:

$1Rec.$2

Then hit the "Use Regular Expression" button (ALT+R):


Your matching lines will be marked:

Replace it – and you’re fine 😎