From: Ben Tilly Date: 2000-12-15T22:39:34+09:00 Subject: [ruby-talk:7315] Re: Where is /pat/g (Perl) and findall() (Python)? "Franz GEIGER" writes: >Wanted to do global pattern search on a string but /pat/g does not work. >How >is this done in Ruby? > >Thanks in advance and best regards >Franz GEIGER You have already been pointed to gsub and scan. However if you want to loop over matches to a string you can also loop over matches using index. It is not as transparent as Perl's /g construct, but it wouldn't be hard to make it so with an appropriate wrapper class and methods. Cheers, Ben _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com