Vscode has a nice feature when using the search tool, it can search using regular expressions. You can click cmd+f (on a Mac, or ctrl+f on windows) to open the search tool, and then click cmd+option+r to enable regex search. Using this, you can find duplicate consecutive words easily in any document.
Visual Studio uses . NET regular expressions to find and replace text.
This patter does work on my VS Code but only on lines that actually contain something. Empty lines stay empty.
Find: ^(.*)$
Replace: $0 Donkey
The easiest way to do it is like this:
Find: .$
Replace: $&Donkey
You can use:
$ = end of line ^ = begin of line
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With