Emergence of an Ising critical regime in the clustering of one-dimensional soft matter revealed through string variables