Use #subinstead #gsubto remove only the first occurrence and make the repetition lazy ( ?):
auteur = "comte de Flandre et Hainaut, Baudouin, Jacques, Thierry"
nom = auteur.sub(/.*?,/, '') # => " Baudouin, Jacques, Thierry"
Or do not use regular expressions at all (returns the original string if there is no comma):
auteur.split(',', 2).last # => " Baudouin, Jacques, Thierry"
source
share