On Fri, May 06, 2005 at 02:21:17AM -0700, Yitzchak Scott-Thoennes wrote:
> On Thu, May 05, 2005 at 09:41:46PM -0400, Rick Delaney wrote:
> > 
> >       / ($alt) .* (?!\1) ($alt) /x;
> 
> Fails with words: (foo, foobar, foobaz) and string "foofoobar".

So it does.  The overlapping strings also cause problems for this
method:

    $x <= grep { $string =~ m/$_/ } @words;

If $string is "foobar" and @words is qw(foo foobar) then this
results in two words found which I don't think the OP was looking for.


-- 
Rick Delaney
[EMAIL PROTECTED]

Reply via email to