[sylpheed:34840] Re: regexp in filter rules

Cr0k crok.r245 at gmail.com
Tue Oct 11 17:13:00 JST 2011


> On Mon, 3 Oct 2011 12:26:38 +0200
> Cr0k <crok.r245 at gmail.com> wrote:
> 
> > I just watched the Wikipedia link, and didn't find why I could put a . 
> > before my *, to make a POSIX regexp… It says that, for example, .*foo 
> > will match all that is ending by *all, so I could also put 
> > '. at foo.com', right?
> > But why .*@foo.com?
> > 
> 
> Hi,
> 
> maybe I wrote "could" while I meant "should", anyways:
> 
> . (dot) means "any _single_ character"
> * (asterisk) means "the _preceding_ element repeated 0 or more times"
> @foo.com is just a string literal.
> 
> So ".*@foo.com" mean:
>   match a string containing a sequence, of legth >= 0, of any 
>   characters followed by the string "@foo.com"
> 
> You need the leading dot because of how the * (asterisk) work, look at 
> the word "preceding" in its definition.
> 
> Just FYI, in shell command lines, when you write something like "ls 
> *.jpg" you are not using regular expressions, but just globbing[1], 
> which is a less powerful form of pattern matching.
> 
> Regards,
>    Antonio
> 
> [1] http://en.wikipedia.org/wiki/Glob_%28programming%29
>

Hi.

I'm really sorry for late, but I'd got things to do.
I just apply your advices, and it works very well, I just tested it.
I don't have unwanted emails in my mailbox, but during the "Get all" window's open, Sylpheed tells that (for example) my gmail mailbox is receiving mails.

Is it really receiving the unwanted mails? 'cause when I browse folders, I don't see them, and I chose "Delete from server" option if adresses match the regexp...

Thanks.
--
Cr0k <crok.r254 at gmail.com>


More information about the Sylpheed mailing list