procmail
[Top] [All Lists]

Re: why this is not working ?

2006-05-26 07:18:47
Matthias,

i try to Match on something like
A B C D E F G
where each letter is separated to the next with a space

with

[^$WS][$WS][^$WS][$WS][^$WS][$WS][^$WS][$WS][^$WS][$WS][^$WS][$WS]

where $WS = $SPACE$TAB

i can get no MATCH

if i use

[^$WS]+[$WS]+[^$WS]+[$WS]+[^$WS]+[$WS]+[^$WS]+[$WS]+[^$WS]+[$WS]+[^$WS]+[$WS]+

i  get  MATCH but  also on all  paragraphs  with  6 and more  Words

if i understand it right the + is for any sequence of one or more of the
leading letter
but i only want to catch single letter's separatet with a space

how to do it right ?

Can there be more than one space between successive non-space characters?

Use a plus sign after the appearances of [$WS] (where you want one or 
more) but not after those of [^$WS] (where you want exactly one), as in
[sorry, I can't send this without a line break inserted by my mailer, so 
I'll mark it with a continuation backslash]

* $ \
(^|[$WS])[^$WS][$WS]+[^$WS][$WS]+[^$WS][$WS]+[^$WS][$WS]+[^$WS][$WS]+[^$WS][$WS]+[^$WS]([$WS]|$)


____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

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