procmail
[Top] [All Lists]

\< and \> *do* match newlines

1997-04-14 13:18:00
Era Eriksson wrote,

| The idea is to prevent e.g. .*bell from matching "labelled". \<bell\>
| will match .bell., @bell., -bell- but not southernbell., bellow, or
| bell at the end of line. (Replacing \> with \>|$ takes care of that,
| as above.)

Actually, \<bell\> will match \<bell at the end of a line (or bell\> at
the beginning of a line, or bell on a line by itself).  \< and \> can
match newlines and the start and end of the search area.

Both \< and \> expand to something approximately like 

   ([^0-9A-Za-z]|$)

You do not have to alternate \< or \> with $ or ^ to match a newline.