You can use VS Code, Sublime Text, Notepad++ text editors to search and replace with regex match on.
Are you familiar with one of these?
Some tutorial in Notepad++:
Either the Format Converter core plugin needs to be updated to convert Bear wikilinks into Obsidian wikilinks or that functionality needs to be added to the new Importer plugin.
You might try filing it as a feature request. I migrated from Bear to Obsidian back when Obsidian was still in beta and before Bear even had wikilinks and they were still using :: instead of == for highlights, and it looks like the Format Converter hasn’t been updated at all since then.
I assume the regular expression is the part that seems complicated. Here is a less complex (but still hard to read) one with explanation.
Before making a sweeping change like this, make sure your backups of the notes are up to date.
Basics
Put this in the “Find” field:
(\[\[[^\/]+)\/
This matches 2 square brackets followed by 1 or more characters that aren’t /, followed by a / — for example, [[Obsidian/.
Put this in the “Replace” field:
$1#
This is the matched text before the slash ([[Obsidian), followed by a # (resulting in [[Obsidian#).
Details
There are a lot of \ characters. That marks the character after it as not special, and is needed when you want to match a character that is used in regular expression syntax.
The \/ at the end matches /.
( and ) mark a sub-pattern separate from the rest. Within that:
\[\[ matches [[.
[^\/]+ matches 1 or more characters that aren’t /.
The brackets mark the contents as a group or range.
The solution is to find across all md files in a folder (your vault) text that we convert. Because every string within the double square brackets (in your Bear Wikilinks) is different, we use regular expressions to match all of them and make the conversion. So it is like normal search and replace but you tick a regex box in a text editor that is capable doing these changes (I listed 3 for you) and of course add your folder where the vault is located.
In the gif animation I linked I showed how to do this in a different scenario, thinking it would be enough.
My regular expression also works and now you’ve got a new one as well. The more the merrier…
Many thanks to @gino_m and @CawlinTeffid for all of their assistance. I have successfully searched for all instances in Obsidian and also using BBEdit vault-wide. The replace function is useful for a single file in Obsidian but there is no vault-wide search and replace at this time so I’ve managed to isolate approximately 40 key instances which I will update manually for the time being.
I will continue to learn more about regular expressions and regex – a million future uses.
Per the wise suggestion of @Synchronicity I have added this to feature requests.
The day job beckons.
Again, I really appreciate all of your help with this.
Steve, if you are on a Mac, I’m pretty sure you can install Sublime Text (free, supporting the devs is optional), where when pressing CMD+SHIFT+F you can specify your vault location in ‘Where’, then copy and paste the match and replacement lines from my own or Cawlin’s example, tick the regex icon (the dot and asterisks one on the left) and you’re good to go.
As Gino says, you’ll need an external app to do a regex search-replace across files — see their earlier posts for suggestions. (There are plugins to do regex search-replace and to do search-replace across files, but last I knew there isn’t one that does both.)
(As a side note, when you don’t need regex the built-in search-replace works pretty well across a not-too-huge number of files. It stays open when you switch to a new note, so you can click a search result , click “Replace All”, and repeat pretty quickly.)