From: beny 18241 Date: 2009-12-18T22:49:43+09:00 Subject: Re: grep a block ok closed Ifigue it out :) puts ARGF.read.scan(/.*?<\/mms:MmsCcppAccept>/m) beny18241 beny 18241 wrote: > > Hi, > > Please can anybody tell how to grep a block? > between 2 string i had few lines of code > > example: > > 1 > 2 > 3 > 4 > 5 > > > i've tried that way but its not working, see below my code: > > --- > #!/usr/bin/ruby > > filename = ARGV[0] > > > File.open(filename).each do |line| > if line =~ //../<\/mms:MmsCcppAccept>/ > puts line > end > end > ---- > > > Please help me > > Regards > Beny18241 -- Posted via http://www.ruby-forum.com/.