From: Marc Heiler Date: 2008-04-07T08:25:28+09:00 Subject: Regex and non-greedy matching? I have a slight problem. I have strings with some tags such as 'name:' I need to match "name:" and "lightblue" In other words: - What is between <> and - What is inside the first <> right next to "name:" The following regex does not work: 'name:' =~ /<([a-zA-Z]+)>(.+?)<\/>/ $1 # => "b" $2 # => "name: $2 should only be name: and $1 should only be lightblue -- Posted via http://www.ruby-forum.com/.