From: "New C." Date: 2011-03-05T04:40:15+09:00 Subject: printing regex results How do you get Ruby to print the string that matches a certain regex pattern. I need to find a pattern where a small latin letter is has three large letters on either side. My code is: str = "aaaDDDbDDDcDDDgHHyHjHJkkjUUh" arr = str.scan(/([A-Z])\1{2}[a-z]\1{3}/) print arr The match is DDDbDDD but the arr prints only the first letter D. How do I get it to print the full string ("DDDbDDD")? -- Posted via http://www.ruby-forum.com/.