Re: Interesting little regex

2006-02-24 Thread Alan Young
Yes, what are the unique occurrences of text in that string? I've run the code and I'm still not exactly sure what it's supposed to do. use Data::Dump qw/ dump /; $a=abcdex4; $a=~s{((\w+?)(??{!$b{$^N}++?(?=):(?!)}))}{($1)}xg; print $a\n; print dump(\%b), \n;

Re: Interesting little regex

2006-02-24 Thread Ronald J Kimball
On Fri, Feb 24, 2006 at 01:40:15PM -0700, Alan Young wrote: Yes, what are the unique occurrences of text in that string? I've run the code and I'm still not exactly sure what it's supposed to do. use Data::Dump qw/ dump /; $a=abcdex4;

Re: Interesting little regex

2006-02-24 Thread Alan Young
I'm afraid I'm not getting what you mean by unique occurrence... Why is there only one unique occurrence of 'abc', when the string contains 'abc' four times? Why are there two unique occurrences of 'de', but only one of 'bc'? Why are there no unique occurences at all of 'abcd'? I'm

Re: Interesting little regex

2006-02-24 Thread Ronald J Kimball
On Fri, Feb 24, 2006 at 03:20:27PM -0700, Alan Young wrote: I'm afraid I'm not getting what you mean by unique occurrence... Why is there only one unique occurrence of 'abc', when the string contains 'abc' four times? Why are there two unique occurrences of 'de', but only one of 'bc'?