From: matz@... (Yukihiro Matsumoto) Date: 2000-03-20T06:52:00+09:00 Subject: [ruby-talk:02025] Re: Ruby Syntax similar to other languages? Hi, In message "[ruby-talk:02024] Re: Ruby Syntax similar to other languages?" on 00/03/19, ts writes: |> If 'g' was an attribute of Regexp, then what would |> |> line =~ /asdf/g |> |> mean? | | while line =~ /asdf/g | print "#$&\n" | end | |it's more perl than ruby, sorry Adding 'g' as a Rexexp option makes me feel like Perl. We have String#scan for this particular purpose. line.scan(/asdf/) do print "#$&\n" end