From: Dan Kelly Date: 2008-01-17T19:46:06+09:00 Subject: Re: Greedy and non greedy quantifiers Andrew Timberlake wrote: >> or >> >> \d* - This will match any amount of digits >> \d*? - This will only match none or one number >> >> Please can someone offer some clarification Im still unsure of myself >> with these expresions as I'm new to ruby, >> Thanks, >> Dan > > Dan > > * matches 0 or more of the preceding pattern > + matches 1 or more of the preceding pattern > ? matches 0 or 1 of the preceding pattern > {n,m} matches n to m of the preceding pattern > > I stand to be corrected but I don't believe that *? or +? are valid at > all. yeah that helps thanks, I think I was just making things up.. -- Posted via http://www.ruby-forum.com/.