Regex strings need to be reordered and cleaned before being passed to the parser. The are a bit edge-casey, but we should still catch them before heading off to tokenization. Currently, the following regex expressions give invalid results:
"a?a": This needs to become "aa?" to allow the optional to be bypassed.
These two need to be handled differently:
"a+a": This needs to become "a+" to consume the second a.
"a*a": This needs to become "aa*" to consume the second a.
Regex strings need to be reordered and cleaned before being passed to the parser. The are a bit edge-casey, but we should still catch them before heading off to tokenization. Currently, the following regex expressions give invalid results:
"a?a": This needs to become "aa?" to allow the optional to be bypassed.These two need to be handled differently:
"a+a": This needs to become "a+" to consume the second a."a*a": This needs to become "aa*" to consume the second a.