Quote:
Originally Posted by ownedbycats
In my case, I was doing this:
Code:
&& publisher == '(Archive of Our Own|FanFiction.net)'
"that doesn't work, i'll try an in instead," so:
Code:
&& publisher in '(Archive of Our Own|FanFiction.net)'
"that gets the right result but looks strange, will it work the other way?"
Code:
&& '(Archive of Our Own|FanFiction.net)' in publisher
|
The "other way" is the right one. A regexp pattern works only if it is the left-hand argument. The "second way" might work but only by accident.
It seems like you are checking if some string matches some item in a list. In that case you probably should use list_contains() instead of 'in'. Something like:
Code:
list_contains($publisher, ',', '^(Archive of Our Own|FanFiction.net)$', 1, '')
I will look at whether a "in_list" operator makes sense given everything else that is going on inside the interpreter.