Add pattern replacement for len_set