How would I go about doing a multiple pattern search in Lua? (I have Lpeg set up).
For example, say I'm receiving strings in a row, I'm processing one at a time, captalizing them and calling them msg
. Now I want to get msg
and check if it has any of the following patterns: MUFFIN MOOPHIN MUPHEN M0FF1N
for a start. How can I check if msg
has any of those (doesn't matter if it's more than one) whithout having to write a huge if(or or or or)
?