> The "+" at the end is superfluous because this would match multiple > concatenated sequences like <xx><yyy> which you want as separate > items. ... I agree with you > >> I have run it in irb: >>>> /(<([^<>]+)>)+/.match('anystring<hour>anystring<min>anystring<sec>anystring') >> => #<MatchData "<hour>" 1:"<hour>" 2:"hour"> >>>> >> As you can see match method return just the first match in MatchData obj >> >> Do you know why ? > > That's the difference between #match and #scan. You want scan in your > code. ... yes, scan works ! thanks a lot, Alessandro -- Posted via http://www.ruby-forum.com/.