procmail
[Top] [All Lists]

Re: Matching Special Characters

2002-02-14 00:03:07
Michael J Wise <mjwise(_at_)kapu(_dot_)net> writes:
...
For some reason, I thot that < & > were used for special processing.
Obviously (he sez, looking at a successful test), I was w0rng.

\< and \> are special, but < and > and normal.


Philip Guenther wrote:
Procmail doesn't support any sort of hex-encoding of characters in
regexps.

...Yet?   (8-)   One word, BIG5.

Just insert the literal characters into your rcfile, then fixup any that
contain regexp specials as part of their multibyte representation.


Maybe.  For now you'll have to write it the long way

     * ^Message-ID: <0000[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]\$

Or just:

      * ^Message-ID: <0000[0-9]+\$

It would be nice to have that facility, especially to set minimum and
maximum values, like {8,12}, or some such. Just a thot.

You can do ranges using multiple nested paren expressions with '?', so
instead of writing, for example, "a{3,7}" you would write:
        aaa(a(a(aa?)?)?)?

(Nesting the parens makes it more efficient to process than the simpler
        aaaa?a?a?a?
as it eliminates duplicate means to matching a given number of
occurences.)


Philip Guenther
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

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