I want one of the clauses of a gpm template to return true iif the
only available format is epub. I tested with this:
Code:
program:
f = $formats;
if
list_contains(f, ',', '^epub$', '1', '')
then 'foobar'
fi
However, it returns 'foobar' for every book that has epub, even if there's other formats.
What should I do?
EDIT: Also, there are other times I might want to match the entire list contents. I am not sure how to do that though.