Fix a regression in comparing regexes to output in tests.
Review Request #12125 — Created March 8, 2022 and submitted
Recently, changes were made to normalize the order of generated SQL for
comparison, working around some weirdness in how Django manages indexes.
This unfortunately broke a set of unit tests specific to SQLite versions
prior to 3.26. These tests rely on regex pattern matching, which wasn't
factored into the normalization code.
These are now treated the same way we treat strings, for the purposes of
normalization, and then processed after.
Ran unit tests that triggered regex pattern matching. Verified the fix.