I need to be able to match all data before the word "Total:" and then I will replace it with "" using gsub. Here is the text: C THIS IS THE TEXT I WANT TO MATCH ON and this..... and this too... and there could be this line too but the following line is always there. Total: But I need to keep all text after the text "Total:" I was thinking that I would somehow use a regexp index but I'm not sure how to do it. thanks jackster -- Posted via http://www.ruby-forum.com/.