View Single Post
Old 02-09-2021, 11:18 AM   #19
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,486
Karma: 8025704
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by capink View Post
Code:
program:
	isbn = select(field('identifiers'),'isbn');
	isbn = re(isbn, '[^\d]', '');
	isbn = re(isbn, '(\d)', '\1,');
	count(isbn,',')
Without going too deeply into the previous posts to see if the answer is already there, it seems that this template is equivalent to the above, but faster.
Code:
program:
	isbn = select(field('identifiers'),'isbn');
	isbn = re(isbn, '[^\d]', '');
#	isbn = re(isbn, '(\d)', '\1,');
#	count(isbn,',')
	strlen(isbn)
chaley is offline   Reply With Quote