logo       
Google Custom Search
    AddThis Social Bookmark Button
-->

Re: how to match all messages in a search: msg#00037

Subject: Re: how to match all messages in a search
* Alex Liberman (alexsf@xxxxxxxxxxx) [030512 21:32]:
> Btw thanks for the fix in Search.pm. Now on to another question..
> I thought this would work, but it doesn't ...
> my $filter=new Mail::Box::Search::Grep(match=>'m/.*/');

The way to pass a regular expression is as regex reference, using the
qr// constructor.  You can also supply a constant string....

  my $folder = Mail::Box::Search::Grep->new(match => 'money' );
  my $folder = Mail::Box::Search::Grep->new(match => qr/\d+\s*euro/i );
-- 
               MarkOv       %-]

------------------------------------------------------------------------
drs Mark A.C.J. Overmeer                                MARKOV Solutions
       Mark@xxxxxxxxxxxx                          solutions@xxxxxxxxxxxx
http://Mark.Overmeer.net                   http://solutions.overmeer.net




<Prev in Thread] Current Thread [Next in Thread>