How to add a string to the end of each line in VS Code using regex?

前端 未结 3 1147
伪装坚强ぢ
伪装坚强ぢ 2021-01-31 09:58

In Visual Studio Code I\'m using the replacement feature. The regex option is activated and the parameters are as follows.

Find: ^.*$
Replace: \\0 D

相关标签:
3条回答
  • 2021-01-31 10:29

    This patter does work on my VS Code but only on lines that actually contain something. Empty lines stay empty.

    Find: ^(.*)$
    Replace: $0 Donkey

    0 讨论(0)
  • 2021-01-31 10:38

    You can use:

    $ = end of line ^ = begin of line

    0 讨论(0)
  • The easiest way to do it is like this:

    Find: $
    Replace: Donkey

    0 讨论(0)
提交回复
热议问题