From: Robert Retzbach Date: 2005-12-18T19:58:40+09:00 Subject: Re: How to grep the shortly matching in a string Arowana Lin schrieb: >I used regular expression to grep content from a web page,but it seems >ruby always match the longest string,but I need to fetch the shortly >matching. How can I do ? >Thanks for help! > > > Would be nice to see the regexp. Maybe using non-greedy multipliers will do. You could also use character classes like [^<>] to match chars between < and >. But I don't know what you want to match, so please show me :>