Context. Galaxies in the Universe form chains (filaments) that connect groups and clusters of galaxies. The filamentary network includes nearly half of the galaxies and is visually the most striking feature in cosmological maps. Aims. We study the distribution of galaxies along the filamentary network, trying to find specific patterns and regularities. Methods. Galaxy filaments are defined by the Bisous model, a marked point process with interactions. We use the two-point correlation function and the Rayleigh Z-squared statistic to study how galaxies and galaxy groups are distributed along the filaments. Results. We show that galaxies and groups are not uniformly distributed along filaments, but tend to form a regular pattern. The characteristic length of the pattern is around 7 Mpc/h. A slightly smaller characteristic length 4 Mpc/h can also be found, using the Z-squared statistic. Conclusions. We find that galaxy filaments in the Universe are like pearl necklaces, where the pearls are galaxy groups distributed more or less regularly along the filaments. We propose that this well defined characteristic scale could be used to test various cosmological models and to probe environmental effects on the formation and evolution of galaxies.