Get your own PHP server

Regex Modifier: cat|dog|fish

How many occurrences of either "cat", "dog", or "fish" are in the text "We have three dogs, one fish, but no cats":

3

The matches were found here:

We have three #s, one #, but no #s

(Each match was replaced by a # character)