From: Sriram Varahan Date: 2009-05-06T16:18:39+09:00 Subject: Ruby Regex Hello, I have this string: "d:\\home\\abc2.zip\\abc.zip\\abc.com" I need to extract the contents up to the first occurrence of zip which would be: "d:\\home\\abc2.zip" When i use a regex like: \(.+).zip\ it gives me the entire contents upto the second zip. "d:\\home\\abc2.zip\\abc.zip" which is not what I am looking for. Any solution to this? Thanks. Sriram. -- Posted via http://www.ruby-forum.com/.