Quote:
Originally Posted by ownedbycats
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;