Remove complicated regex matching.