Artificial intelligent assistant

procmail recipe with a regex doesn't work In my `~/.procmailrc` I have the following lines: :0 \* ^Subject:.*(O|o)pen( \|)(S|s)(onic|urge) $MAILDIR/OpenSurge/ As you see, I would like to put any mail containing “Open Surge” (or any variant with space or capital letters) in the folder OpenSurge. But the messages containing this words only went to the default folder. Notice that I have a lot of others recipes with `^From:foo` and when I try `^Subject:.*OpenSurge` my recipe work with “OpenSurge” but I doesn’t work with the regexp `^Subject:.*(O|o)pen( \|)(S|s)(onic|urge)`. So, how can I match please with a regexp all possibilities of writing “Open Surge”?

How about this:


:0
* ^Subject:.*Open[ ]*Surge
OpenSurge


The default settings for procmail is to ignore case. See also `D`.

A matching message is stored in the file OpenSurge. It is normally located in `~/Mail/`.

[Edit]

If you additionally want to match "Open sonic", you can use the regexp from @Bruce Ediger, but there are also other ways:

Add another matching rule


:0
* ^Subject:.*Open *sonic
OpenSurge


or


:0
* ^Subject:.*Open *Surge | \
^Subject:.*Open *sonic
OpenSurge


or


:0
* ^Subject:.*(Open *Surge|Open *sonic)
OpenSurge


and so on.

You also should not use the default `.procmailrc` but one with comments like this one.

To check what's going on switch on `VERBOSE`. The logs are stored in `LOGFILE` .

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy d02936648802dc597a3e821902b8c2a2