From: Sebastian Hungerecker Date: 2008-02-21T05:49:17+09:00 Subject: Re: regex question J. Cooper wrote: > My current regex is: > text.scan /^(.*)([-+]?[0-9]+\s+points?)(.*)$/i > [...] > My problem is, the (.*) is eating up parts that I would like to appear > in group 2. Make it non-greedy: (.*?) HTH, Sebastian -- NP: Anathema - Cries On The Wind Jabber: sepp2k@jabber.org ICQ: 205544826