Closed stepsal closed 1 year ago
I also need this regex
Support for nested tags is covered now, in this version of dev
branch (latest commit https://github.com/mfarragher/obsidiantools/commit/aff8605003b408db77970f2f6d20005de2cb5454 ).
I will also explore adding tag counts in future commits to that branch.
The current tags_regex is not parsing nested tags for me The proposed regex will also parse all tags from "sussudio.md" example without needing to modify the raw text beforehand. Would be a good improvement to move all the regexes into a constants.py file and load them from there.
Current regex:
tags_regex=r'(?<!\()#{1}([A-z]+[0-9_\-]*[A-Z0-9]?)\/?'
Proposed Regex:
tags_regex=r'(?<!\()(?<!\\)#{1}([A-z]+[0-9_\-]*[A-Z0-9]?[^\s]+(?![^\[\[]*\]\]))\/?'