hmm \S+(\s+\S+)?(\s+\S+)?(\s+\S+)?(\s+\S+)?(\s+\S+)?blah$
ok
\S non-space
so 1 or more non-space (make word 1)
\s\S space and non-space
so 1 or more spaces and 1 or more non-space (make word 2)
6 times
plus end with blah
+ mean 1 or more
? mean 0 or 1
$ end of line
-----Original Message-----
From: Kimmo Jaskari [mailto:kimmo(_at_)alcom(_dot_)aland(_dot_)fi]
Sent: Monday, November 16, 1998 11:49 AM
To: Procmail Mailinglist
Subject: Simple (for you) regexp question
Ok, I need to match a line that can basically start with anything
from one word to 6, but always ends the same way. Thus far I've been
using .* even though that for some reason is not the way to do it (yes,
when it comes to procmail recipes I'm of the steal, cut and paste
school)
How exactly _should_ I do it?
Regards,
Kimmo.
--
---------------------------------+-------------------------------------+
Kimmo Jaskari | ÅLCOM - Ålands Datakommunikation Ab |
E-mail: kimmo(_at_)alcom(_dot_)aland(_dot_)fi |
http://www.alcom.aland.fi |
http://www.alcom.aland.fi/kimmo | Phone: +358-(0)18-12122 |
---------------------------------+-------------------------------------+