perl -E 'say for "cat:dog" =~ /(cat)*/g;say "=";say for "dog:cat" =~ / +(cat)*/g' [download]
In reply to Re^5: Likely trivial regex question by choroba in thread Likely trivial regex question by moodywoody