in reply to Re^4: Likely trivial regex question
in thread Likely trivial regex question

See my reply to graff: Re^4: Likely trivial regex question. To clarify your examples with "cat", use the /g modifier in list context to understand:
perl -E 'say for "cat:dog" =~ /(cat)*/g;say "=";say for "dog:cat" =~ / +(cat)*/g'