Re: procmail<->egrep mit Leerzeichen
Hallo,
Danke, Andreas.
Am Freitag, 21. Feb 2003, 09:27:42 +0100 schrieb Andreas Metzler:
> Bertram Scharpf <b.scharpf@tesionmail.de> wrote:
> > :0 H
> > * ^X-Known-Address: .*\<troll\>
> > /dev/null
>
> > erwischt er's nicht, aber er kriegt's mit
>
> > :0 H
> > * ^X-Known-Address:.*\<troll\>
> > /dev/null
>
> [...]
> > Mit `egrep' geht das:
>
> > $ egrep '^X-Known-Address: .*\<troll\>' ~/Mail/linux/debian
> [...]
>
> Fuer egrep bedeutet \< etwas anderes als fuer procmail:
>
> -------------------------------------------
> prcml> Match the character before or after a word.
> prcml> They are merely a shorthand for `[^a-zA-Z0-9_]', but can
> prcml> also match newlines. Since they match actual characters,
> prcml> they are only suitable to delimit words, not to delimit
> prcml> inter-word space.
> -------------------------------------------
> egrep> The symbols `\<' and `\>' respectively match the empty string at the
> egrep> beginning and end of a word.
> -------------------------------------------
> Das eine matcht auf "empty string" das andere auf "the character..."
Ich erinnere mich sogar, da schonmal drübergelesen zu haben.
Zuletzt las ich aber das:
prcml> Conditions start with a leading `*', everything after that
prcml> character is passed on to the internal egrep literally,
prcml> except for leading and trailing whitespace. These regular
prcml> expressions are completely compatible to the normal
^^^^^^^^^^
prcml> egrep(1) extended regular expressions. See also Extended
prcml> regular expressions.
Dann sollte ich denen sagen, sie sollen diese Passage streichen,
oder?
Bertram
--
Bertram Scharpf
Stuttgart, Deutschland/Germany
Reply to: