I have form lines:
cake!apple!
apple!
cake!juice!apple!cake!
juice!cake!
In other words, these lines consist of three substrings "cake!", "apple!"and "juice!".
I need to check these lines. Thus, using a regular expression, you can:
/^(apple!|juice!|cake!)*$/
But Lua templates do not have an operator |, so it seems like you can't do it this way.
How can I check my lines in Lua?
(I'm not interested in the contents of the strings: I don't care if they match (check) or not.)
I know to write code to do this, but I can't think of a short way to do this. I am looking for a short solution. I wonder if there is an elegant solution that I don't know about. Any ideas?