From: Robert Dober Date: 2008-12-06T22:30:37+09:00 Subject: Re: Proximity searches in Ruby On Sat, Dec 6, 2008 at 2:06 PM, Michael Fellinger wrote: >> File::read("test.data").scan %r{Hello.{0,10}World}im > > That would be 10 characters Huh?? cat test.data && echo "=============================" && cat scan.rb && ./scan.rb Hello World hello ** * world hello do not find this world ============================= #!/usr/local/bin/ruby # vim: sw=2 ts=2 ft=ruby expandtab tw=0 nu syn=on: # file: scan.rb p File::read("test.data").scan( %rim ) ["Hello World", "hello **\n* world"] R.