Quote:
Originally Posted by ownedbycats
What would be the best way to remove excessive whitespaces in the middle of a value? (Calibre seems to remove them at the beginnings and endings.)
I was thinking something like re checking for two or more spaces but wasn't sure if there was a better way.
|
I would use
Quote:
Originally Posted by ownedbycats
Additional question:
I have this template for listing the first letter (or 0-9 if numeric)
Code:
{title_sort:'contains(t=uppercase(re($, '^\W*(\w).*$','\1')), '\d', '0-9', t)'}
I'd like to use transliterate() to standardize the letters (currently accented characters shown separately). How would I add that?
|
Code:
{title_sort:'contains(t=transliterate(uppercase(re($, '^\W*(\w).*$','\1'))), '\d', '0-9', t)'}