Use one regular expression instead of two for charset detection