Visual Studio Code : Append and Prepend text to lines

Similar to an earlier post. Syntax is the same as for Sublime Text.

  • Open the Search and Replace boxes.
  • Click on the RegEx icon
  • In the search field, enter :
    • ^(.+)$
  • Then in the Replace field, enter:
    • chocolate$1cookies
  • This will surround your existing lines with chocolate and cookies.
  • These captures might help
    • AppendPrepend_VisualStudioCode_002
    • AppendPrepend_VisualStudioCode_001