Posted 11 April 2017 - 11:23 PM
Hello guys. It's been a long time since I actually was on this forums, and even longer than when I was actually active. The question I'm posing today is more of a general Lua question as opposed to a CC question as I'm asking this question for a project that is unrelated to CC in any way, besides Lua that is.
I'm mostly just asking this question here as the resources online aren't always the best at finding pertinent information for patterns, and I respect your guy's knowledge on Lua.
So the question today is how might I possibly achieve a ReGex's '|' operator in patterns. I've read it cannot be done in patterns themselves, so I'm gonna pick your brains on it.
The reason for this is that I'm matching console input that is able to be formatted like
I can easily do this on my own without messing with patterns, but I'd rather my code not to be too long if there's a way to bypass that restriction.
Soo yeah, here's hoping I don't have to take too much time to develop the solution and can instead use a different avenue.
I'm mostly just asking this question here as the resources online aren't always the best at finding pertinent information for patterns, and I respect your guy's knowledge on Lua.
So the question today is how might I possibly achieve a ReGex's '|' operator in patterns. I've read it cannot be done in patterns themselves, so I'm gonna pick your brains on it.
The reason for this is that I'm matching console input that is able to be formatted like
arg1 arg2 "this is arg3" arg4 "another arg that is arg5"
And so on.I can easily do this on my own without messing with patterns, but I'd rather my code not to be too long if there's a way to bypass that restriction.
Soo yeah, here's hoping I don't have to take too much time to develop the solution and can instead use a different avenue.