I wanted to see if this would work for a hierarchical column.
Code:
# fanfictags combines several other categories to a single Calibre column.
# category2 for includes/replaces before inclusion (without editing source category and title pages).
include_in_fictags:,char2,ship2
include_in_char2:characters
include_in_ship2:ships
replace_metadata:
## Fanfic tags
char2=>(.*)=>[Characters].\1
ship2=>(.*)=>[Relationships].\1
The replace messed up so that every character/ship looks like
[Relationships].foo/bar[Relationships]
Messed up regex?
EDIT: Yes looks like. Calibre must've automatically dropped the trailing period:
https://regex101.com/r/m9P7u9/1