I don\u2019t know the code, so this is probably wacky, but could one giant Regex be made out of all these patterns or-ed together, each a named capturing group, then there\u2019s only one pattern compiled and one run matching per request?