Support rules with multiple regexes.

Includes some minor style improvements.