Use case or problem
I commonly edit files using regular expressions. This isn’t possilbe yet.
Implement a regex search and replace function for content editing. E.g., like the one in VS Code
Current workaround (optional)
Open in default application [opens file in VS Code] edit the file using regex.
I’d love to stay within obsidian.
Thanks for adding some more workarounds.
Unfortunately, these are just that: Workarounds.
Would be great if RE would be supported natively.
RE is one of the key features for editing plain text files, IMHO (same goes for beancount for accounting, etc.) It’s so powerful…
Regex Find/Replace works well for me both for normal and regex search&replace in a single file.
(my hotkey: Alt+Shift+R)
Plugin for Obsidian, providing search/replace functionality which supports regular expressions and selections. - GitHub - Gru80/obsidian-regex-replace: Plugin for Obsidian, providing search/replace...
If I only want part of the page changed I enable Replace only in selection
(PS: the button still reads “Replace All” but it actually only makes changes in the area I preselected)
My personal tags are all prepended with a hyphen “-”
I do this so that they might stand out in a graph but mainly so that I can easily regex search for them.
Quite often when I capture stuff I tag it e.g. with
#-cs-prog-regex- BUT it will also contain tags made by others #notMyTag #notMyTagEither polluting my tag hierarchy.
… so with Regex Find/Replace
i.e. the ones with T in front won’t appear in my tag hierarchy but I can still easily find them if I wanted.
Global Search and Replace for Obsidian can do a global regex search & replace through all the markdown files in your vault. I am very careful with this one as I’ve , in the learning process, made changes I didn’t intend to.