Regex Modificateur : chat|chien|poisson

Combien d'occurrences de "cat", "dog" ou "fish" y a-t-il dans le texte "We have three dogs, one fish, but no cats" :

3

Les matchs ont été trouvés ici :

Nous avons trois #s, un #, mais pas de #s

(Chaque match a été remplacé par un caractère #)