Configurable regexes, simplify a bit