my_string = 'AaaBbbCcc DddEee'puts my_string.scan(/[A-Z][a-z]+(?:\s+[A-Z][a-z]+)*/)
Standard input is empty
Aaa Bbb Ccc Ddd Eee
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!