From: Jon Fi Date: 2007-03-30T15:32:32+09:00 Subject: Re: Regex problem... Tried Searching forum already... :( Tim X wrote: > James Edward Gray II writes: > >>> def go(lines) >>> >> >> >> if the value is out of range; the +Range+ form will raise a >> Hope that helps. >> >> James Edward Gray II >> >> >> > > I would also recommend anchoring your regexp. In fact, you will probably > get > better performance by anchoring your RE and removing the splice (unless > the > lines are a *LOT* longer than your example line). If you anchor your > regexp to > the beginning of the line, the engine will stop trying to match as soon > as it > cannot match the [trace-. To do this, start the regexp with a ^ i.e. > /^\[trace\-.... > > Tim The proper use of slice fixed it! I knew it was something retarded-ly simple... :( I really appreciate your help everyone. The energy behind this language is amazing. Thanks for helping a stupid noob! Also the anchoring note... Good call. I'm am actually parsing a proprietary message framework. Some of the lines will be megabytes in length... -- Posted via http://www.ruby-forum.com/.