Mark Bruderer

Vscode Regex Replace

When copying my notion notes into my blog. I ran into the problem of notion using the aside tag. I needed to convert it to the markdown based tags of vitepress, which are based on three colons :::.

This is an example:

Important Definition
::: info
Important Definition

The solution is to use the search feature in vscode. With these inputs:

  • Search: <aside>(.*[\s\S\n]+?)</aside>
  • Replace: ::: info $1 :::

vscode search replace regex

Don't forget to click the icon (it will show up activated in blue as in the screenshot.)

Cheers, Mark