I looked through the Help forum and haven’t found anything that quite fits my situation.
I imported a couple thousand notes from Joplin (via MD export in Joplin then drag-and-drop into the Obsidian vault) - before Joplin I used Evernote for a decade. Most of my notes are content I created, but some were clipped (Evernote) or copy-paste (Joplin) from internet posts that had hashtags in them, e.g. #35mm or #newzealandhops. These were not tags in Evernote or Joplin, but they are in Obsidian. In Joplin I have about 180 tags (which is too many, and I’ve been meaning to cull them) but in Obsidian I now have over 2,000 tags.
Questions:
How do I get rid of the excess tags?
Do I need to hunt down each note with the offending “#” in the body of the text and edit it?
What I’m trying to do
Remove the thousands of tags that appear in Obsidian that aren’t in the original (Joplin) file.
Things I have tried
Editing individual not-tags that have a “#”, e.g. adding a space between “#” and “newzealandhops” or a " ’ " before the “#”. This works. However, even thinking about using this brute force method, hunting down each “#” that isn’t supposed to be a tag, is exhausting.
The remaining tags are my tags:
I PREpend & APpend my tags/labels with “-”.
I do this so that, after importing my Keep notes into Obsidian, I can better “find” them in …
Obsidian, Logseq graphs
Regex(regular expression) searches
… so here I can both keep my tags and disable those from other people.
This was a time saver but I still had to do it page by page.
If I had a lot of them I would instead use the Global Search and Replace plugin; however I would do it in a duplicate vault as the possibility of error is quite high.
Thank you for the suggestions. Both of these are new to me so I’ll look into them, at first glance they look like I might be able to use this to get rid of all tags, but not maintain the tags I added (in the other apps) intentionally.
@ichmoimeyo Thank you for the reply with a helpful example and explanation. I like the suggestion to use “-” before and after the tag name, I was concerned about my note portability going forward (of something like this happening again if I decide to switch to another notetaking tool). I already add “-” between words within a tag, e.g. “#thank-you”, because switching between Evernote and Joplin all of my two-word tags got turned into two words, e.g. “thank you” → “#thank#you”.
Since I don’t yet use “-” before/after in my tags, I might use the Find/Replace to first add the “-” before/after. For example:
Find: #beer → Replace with: #-beer-
@Notes Once you have altered all your tags to the #-xyxyxy- system you can find all the pages with your tags only (in case you still have other style hashtags from imports)