Is there an equivalent function of \"%in%\" from R for Stata?
working with lists proper is one way, you could also just treat the rhs like a string and treat the lhs as a regex, use regexm()