ok closed Ifigue it out :)

puts ARGF.read.scan(/<mms:MmsCcppAccept>.*?<\/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:
> <mms:MmsCcppAccept>
> 1
> 2
> 3
> 4
> 5
> </mms:MmsCcppAccept>
> 
> 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>/../<\/mms:MmsCcppAccept>/
>         puts line
>         end
> end
> ----
> 
> 
> Please help me
> 
> Regards
> Beny18241

-- 
Posted via http://www.ruby-forum.com/.