So, you're swapping around pieces of the input, even on lines that do not contain a
=? And on the other hand, you
don't swap around input on lines that do contain a
=, but don't match a regexp you distilled from looking at two examples? Yet, you still allow many other lines that aren't either the first, or the second example.
That's an, uhm, "interesting" way of answering the question. I wonder whether it's helpful.