From: Matt White Date: 2007-06-20T04:05:07+09:00 Subject: Regular Expresion Needed Hello, I am fairly new to Ruby. I have some good Perl experience and I need to "translate" a regex in Perl over to Ruby. Here's what I have: $_ = 'abc123def456ghi789jkl'; while(m/(\d{4})/g) { print "$1\n"; } Which outputs: 123 456 789 Ruby doesn't seem to have the same modifiers that Perl does (that handy little g). How can I get this same output in Ruby? Thanks!