From: Collin Moore Date: 2009-10-13T06:09:31+09:00 Subject: Re: remove specific text from line Alexey Bovanenko wrote: > Hi! > > I think you can use the following solution: > > class TestClass > def test(val) > val.scan(/^[^@]+@(\d{1,3}\.\d{1,3})[^*]+\*{3}\s*([^*]+)/) do > puts $1+" : "+$2 > end > end > end > > myInst=TestClass.new > myInst.test("Time@110.075: EVENT: [LOG] *** DEBUG ACTION ***"); > > The result is: 110.075 : DEBUG ACTION I tried this and 110.075 : DEBUG ACTION repeats for all the lines in the output. -- Posted via http://www.ruby-forum.com/.