procmail
[Top] [All Lists]

Re: Messed Up Subject Line??? Help

1996-12-11 13:57:33
Era Eriksson wrote,

| It bears pointing out that Procmail's notion of \< and \> is less
| generic than egrep's, which actually matches these on the empty string
| at the boundary of a word. Procmail's boundary matches only match on
| actual characters, i.e. foo\> doesn't match a foo at the very end of a
| line.

Actually, it *can* match at the end of a line because \< and \> will match
newlines.  But yes, procmail needs an actual character (even if it's a new-
line) for \< or \> to match on; perl and egrep will let those match to the
actual boundary point of a word.  As the man page says, \< and \> generally
work to delimit a word, because they can match on the space or punctuation
immediately after and before the word, but not to delimit the whitespace or
punctuation marks between words because they cannot match on the last letter
of the preceding word nor on the first letter of the following word.

My guess is that \< and \> expand to something like

 ([^A-Za-z0-9]|$)

| Use foo(\>|$) as demonstrated above for that. 

You don't have to, because \> will match a newline.  foo\> is enough.

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