And rewrite that horrible, broken regexp.