Use case or problem
When trying to use regular expressions in the “search in the current file” feature, followed the instructions from the Search section of the online Obsidian documentation at Search - Obsidian Help
The details there don’t work. I found out from a separate forum post that regex only works in global search.
Proposed solution
To the documentation at Search - Obsidian Help add a clarifying note:
NOTE: regular expressions will only work when using Global Search, not when using the search bar within a file. To use regular expressions when searching a single file, either specify the file in global search, or use a plugin to enable regex in local file search.
Current workaround (optional)
- copy the file contents to Sublime Text and use the regex search there
- add the search operator
file:<current file>
to global search and use regex there (not convenient)