Question: There's a number of specific tags I'd like to remove, but
not their children. (e.g.
Fiction.Cultures & Regions.Canada or
Fiction.Social Issues.Prejudice & Racism - in these cases "Cultures & Regions" and "Social Issues" are just organizational tags and I don't need them to appear in the lists.)
Is this along the right lines? No errors, but it didn't actually remove the tags.
Code:
program:
g = field('tags');
stripped_hierarchies = list_re_group(g, ',', '.',
'^(Fanfiction|Documentation and Manuals)($|\..*$)',
'(Cultures & Regions|Social Issues)',
'{$}', '');
split_hierarchies = re(stripped_hierarchies, '\.', ',');
cleaned = list_union('', split_hierarchies, ',');
sorted = list_sort(cleaned, 0, ',')