in reply to Re: a regex which can detect if a string have all of some characters
in thread a regex which can detect if a string have all of some characters

Safer with just a few extra chars: map { "(?=.*?\Q$_\E)" }
  • Comment on Re^2: a regex which can detect if a string have all of some characters
  • Download Code

Replies are listed 'Best First'.
Re^3: a regex which can detect if a string have all of some characters
by moritz (Cardinal) on May 13, 2008 at 21:30 UTC
    .. or my favorite formulation:
    my $re = join '', map { "(?=.*?$_)" } map { quotemeta } @a;