RE: Regular expression not working as expected

2005-08-11 Thread Daniel Kurtz
-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

Re: Regular expression not working as expected

2005-08-11 Thread Robin
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,

Re: Regular expression not working as expected

2005-08-11 Thread Manav Mathur
According to the tutorial I'm following: {n}matches exactly n of the previous thing Thus I expect: "fo" =~ /o{2}/ = false "foo" =~ /o{2}/ = true "fooo" =~ /o{2}/ = false Instead I get: "fo" =~ /o{2}/ = false "foo" =~ /o{2}/ =

Regular expression not working as expected

2005-08-11 Thread Daniel Kurtz
According to the tutorial I'm following: {n}matches exactly n of the previous thing Thus I expect: "fo" =~ /o{2}/ = false "foo" =~ /o{2}/ = true "fooo" =~ /o{2}/ = false Instead I get: "fo" =~ /o{2}/ = false "foo" =~ /o{2