View Single Post
Old 03-01-2018, 09:08 PM   #3
jjquin
Junior Member
jjquin began at the beginning.
 
jjquin's Avatar
 
Posts: 9
Karma: 10
Join Date: Mar 2018
Device: Android - FBReader
So I came up with something using re() function. Unfortunately it only works if the Hierarchical Genre has the same number of arguments (matches) in the string:

{#genre:'re($,"^([^.]+)\.([^.]+)\.([^.]+)\.([^.]+)","\1/\2/\3/\4")'}

This works for (Non-Fiction.Manual.Appliance.Kitchen) to (Non-Fiction/Manual/Appliance/Kitchen) but fails for (Fiction.Science Fiction.Space Opera). Going to try re_group next.
jjquin is offline   Reply With Quote