emit charsets after strings so that the final regexp finds the longest match.