improved concatenation for BasicAutomaton.regex(String)