From: Jonas Bengtsson Date: 2002-07-04T06:32:04+09:00 Subject: Re: Regular Expression problems Hello Nobu, Wednesday, July 03, 2002, 8:56:22 PM, you wrote: > re = /\n(.*?)( Or: > re = /\n(.*?)(?= while match = re.match(unprocessed) > name = match[1] > content = match[2] > unprocessed = match.post_match # <-- > puts "MATCH", "name:#{name}", "content:#{content}" > end Thanks! I didn't see this in Programming Ruby before: re ? Matches zero or one occurrence of re. The *, +, and {m,n} modifiers are greedy by default. Append a question mark to make them minimal. -- Best regards, Jonas Anyone can make the simple complicated. Creativity is making the complicated simple. - Charles Mingus