From: Ahmad Azizan Date: 2009-10-26T16:33:38+09:00 Subject: Try to copy text between two know string Hello, I have a sample text, like this; eg; def test = 100; puts test (1..10).each { |i| puts i } end how can I copy the text in range between 'def' and 'end', which are test = 100; puts test (1..10).each { |i| puts i } into a variable. I've tried using ~/def ... ~/end but not matched -- Posted via http://www.ruby-forum.com/.