View Single Post
Old 09-19-2014, 10:38 AM   #580
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,450
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by DMee View Post
Whilst I am asking - how would I get a column of the length of the title - I have some that have ended up massively long and I want to quickly find them and edit them :-)
The template is
Code:
{title:strlen()}
Quote:
Originally Posted by DMee View Post
Actually its not handling and words 3 or less properly - loses last letter??
Try
Code:
initials = re(stripped, '[\s]?([^\s]{1,3})[^\s]*(\s|$)', '\1');
Quote:
Originally Posted by DMee View Post
Also is it poss to have it as

Wor-Wit-End
Does this do what you want?
Code:
initials = re(list_re(stripped, ' ', '[\s]?([^\s]{1,3})[^\s]*(\s|$)', '\1'), ' ', '-');
chaley is offline   Reply With Quote