bug-mailutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: mail regex


From: Sergey Poznyakoff
Subject: Re: mail regex
Date: Sat, 11 Aug 2001 09:46:15 +0300 (EET DST)

> > strstr comparison. What if we implement regexps?
> 
> I've put quickly an implementation for this see msgset.y(select_subject)
> You will have to enable it by hand -DHAVE_REGEXEC.
 
Great! 

> - providing support for this will force the link of regex suite
>   which is big and sometime not available.
>   We could drop GNU regex in mailutils/lib/regex.c and fallback to it
>   for system missing it .. but still.

Yes, I guess it is a good idea.
 
> - If I want to search explicitly for substring in subject that contains
>   metachars '* < > ? . $' etc .. it is impossible.

Why? One can always escape metacharacters, e.g:

        from /a \* subject/


I believe it is a very useful extension. We can provide an environment
variable controlling this feature, so that those who don't need it
might simply place

        set noregex

in their mail.rc file to turn the feature off.

I'd vote that we add a check for regexp to configure.in with a fallback
rx.c or regex.c in lib/.

Actually, I am thinking about a more general approach. Sometimes it
is necessary to select letters on the contents of an arbitrary
header.  So, I'd extend the search syntax to something like

        Received:/.*mirddin.*/

meaning select all the letters with the given regexp in Received: header.
If the "header:" portion is omitted, it defaults to Subject:.
Any comments?

Regards,
Sergey




reply via email to

[Prev in Thread] Current Thread [Next in Thread]