View Single Post
Old 10-22-2011, 01:03 PM   #3
uli
Member
uli has a complete set of Star Wars action figures.uli has a complete set of Star Wars action figures.uli has a complete set of Star Wars action figures.
 
Posts: 13
Karma: 296
Join Date: Jun 2011
Location: Montreal
Device: Kobo, Calibre
Thanks, works perfectly! Now those extra long Star Wars series are readable!

Here is the final code.

Shows series as initials for Star Wars and Star Trek
Shows full series name for everything else.
ex: 'Star Wars: The New Jedi Order...' = SWTNJO - 11 - Rebel Dream
ex: Culture - 01 - Consider Phlebas

Code:
program: contains(field('series'), 'Star Wars|Star Trek', template('{series:re(([^\s])[^\s]+(\s|$),\1)}{series_index:0>2s| - | - }{title}'), template('{series}{series_index:0>2s| - | - }{title}'))
uli is offline   Reply With Quote