obsidiantools
obsidiantools copied to clipboard
regex improvements (tags)
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]+(?![^\[\[]*\]\]))\/?'