VSCode Find and Replace Using `regex`
This morning I needed to do some bulk “find and replace” operations in most of my Rootstalk content. My first thought was to write and run a little Python script, but then I wondered what VSCode might bring to the table. Plenty, it brought plenty!
To keep this post as brief as possible, I’m simply going to reference an instructional video that I created earlier: VSCode-Find-and-Replace.mp4.
A list of some links mentioned in the video is provided here:
If you’re looking specifically to install and use the
regex-previewer extension check out:
Since Rootstalk code is in a private repo, I’m including the contents of my
link-format.js file here:
var find_period = /\[(.+)\]\((.+)\)\./ var replace_period = /[$1.]($2) / var find_comma = /\[(.+)\]\((.+)\)\,/ var replace_comma = /[$1,]($2) /