View Single Post
Old 05-04-2023, 08:29 AM   #609
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,465
Karma: 8025600
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by ownedbycats View Post
What is the best way to check a column for multiple patterns and return for any matches? Here is what I have:

Code:
program:

omnibus =
	if 
		'Box Set' in $title
		|| 'Complete Series' in $title
		|| '(Books|Volumes) (\d+-\d+)' in $title
	then
		'omnibus'
	else
		''
	fi;

list_union(omnibus, $#admintags, ',')
This is for use in an Action Chain. It adds 'omnibus' to #admintags if the title indicates it's one.
Code:
program:

omnibus =
	if 
		'(Box Set)|(Complete Series)|((Books|Volumes) (\d+-\d+))' in $title
	then
		'omnibus'
	fi;
chaley is offline   Reply With Quote