I'd like the plugboard to use a different formatting when the series is Star Wars or Star Trek. So I created the following, everything works except if the title contains a comma or a parenthesis.
The calibre template guide mentions you need to escape these. How can I escape a field value?
Code:
{series:contains(Star Wars|Star Trek, {title}, {series}{series_index:0>2s| - | - }{title})}
Bad Solution:
Spoiler:
Created a custom column to escape the offending commas
Code:
#clean_title
{title:re(\,,\\,)}
Code:
{series:contains(Star Wars|Star Trek, {#clean_title}, {series}{series_index:0>2s| - | - }{#clean_title})}
The solution is to use program mode in the plugboard mentioned bellow.