As much as I hate to complicate the code like this, string definitions will not work for the level of control I need over the order of matching.