On Friday 12 August 2005 02:11, Daniel Kurtz wrote:
>             "fo" =~ /o{2}/ = false
>             "foo" =~ /o{2}/ = true
>             "fooo" =~ /o{2}/ = true
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'. 

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

Attachment: pgpePgE871mmS.pgp
Description: PGP signature

Reply via email to