I sometimes feel embarrassed by this hobby. I'm a grown man playing make believe, and I don't have the excuse of saying it's for a book or game. But occasionally I gain useful skills through the course of my conworlding.
Over the weekend I ported all my Obsidian notes for the Lonely Galaxy to DokuWiki. Part of that process involved extracting the hashtags from each markdown file and transforming them into a format that the DokuWiki tag plugin could parse. This involved some Python regex nonsense.
Now I'm at work, and lo and behold, I'm encountering a nearly identical problem, porting an Obsidian vault to another format, with tag extraction being one of the steps. So I revisited the script I wrote for the LG wiki to see how I did it. It's one function with a single return statement.
def get_tags(some_string):
return re.findall(r"#\w+",some_string)
So as shy as I am about this project, it is proving useful.