Don't leak expanded lhs/rhs in do_regex
Fix building without regex support