-----Original Message----- From: Robin [mailto:[EMAIL PROTECTED] Sent: Thursday, August 11, 2005 09:27 To: beginners@perl.org Subject: Re: Regular expression not working as expected
>>>>> This is correct, it's because you're saying "find two 'o' next to each other somewhere", with no other restrictions. In this example, you could use: /^fo{2}$/ which would only match "foo". Or perhaps: /[^o]o{2}[^o]/ which would only return true if there were two 'o' surrounded by anything other than 'o'. <<<<< OK, that last example accomplishes what the tutorial IMPLIES ought to be happening with {n}. It says that if you want n or MORE adjacent matches, use {n,}. In my experimenting so far, {n}, {n,} {n,y} are all having exactly the same effect, which is not what the tutorial suggests. O well, I'm rewriting the thing anyway, so I guess I've found something I need to correct. daniel Hope that helps you see what's going on. -- Robin <[EMAIL PROTECTED]> JabberID: <[EMAIL PROTECTED]> Hostes alienigeni me abduxerunt. Qui annus est? PGP Key 0xA99CEB6D = 5957 6D23 8B16 EFAB FEF8 7175 14D3 6485 A99C EB6D -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>