in reply to Re: Nested foreach
in thread Nested foreach
That's a lot of B's. (I was making a motorboat sound just thinking about that regex. {grin})my $ignore = '(?:\b'. join('\b|\b', map quotemeta, @ignore). '\b)';
Wouldn't this be simpler?
my $ignore = '\b(?:' . join("|", map "\Q$_", @ignore) . ')\b';
-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: •Re: Re: Nested foreach
by broquaint (Abbot) on Apr 25, 2003 at 15:44 UTC |