Quickly remove block ids

Is there a quick way to remove block ids en masse from a note?

Block IDs tha you define yourself would be relatively simple. Would you try regex replace? I know not everyone is comfortable with a terminal. But it would be very easy / \^.*$//

Thanks, I am a normal user though, so I have no idea how to regex a single note from the terminal. I have used regex inside Word fine, but I don’t see any way to do that with Obsidian search and replace.
Isn’t there any plugin that can accomplish this?

apply patterns community plugin – you can add a name to the pattern and the command below (you need to scroll down in the plugin settings to the commands section when you are done setting the pattern and replacement)

so:

first set the regex pattern to \^.*$ and no input (zero string) on the replacement
set multiline flag as well
you can either choose whole note or selected text to effect changes on – the latter is recommended (just select text manually and fire the command)

but before you can do that, you need to register the new pattern&command, so disable and reenable the apply patterns plugin and after you’ll have your command in the command palette

i’m not sure the regex pattern provided above is enough for you as it is though…

maybe use instead:
(\^[0-9a-z]{6}$)|(\^[0-9a-zA-ZÀ-ŰØ-áàäæãééíóöőüű-]{3,99}$)

run /(\^[0-9a-z]{6}$)|(\^[0-9a-zA-ZÀ-ŰØ-áàäæãééíóöőüű-]{3,99}$)/ in your obsidian search modal first to see this finds all well

2 Likes

Thank you very much for the detailed explanation. :slight_smile: