Replace `length` in slices by `$`