Philip Guenther <guenther(_at_)gac(_dot_)edu> writes:
Yes. But it would be nice if this kind of discussion were in the
procmail man pages. Maybe it is and I'm missing it. I don't expect
the kind of details like in this thread but for example:
The fact that perl-like non-greedy operators work.
Those aren't non-greedy operators. "(.*,)?" means "optionally match
any number of non-newline characters followed by a comma". Non-greedy
operators have the question mark right after the *, +, ?, or }. Procmail
does not support non-greedy operators as such. When using the match
token, procmail treats _all_ the operators on the left-hand side of the
\/ as non-greedy and all the operators on the right-hand side of the \/
as greedy. Yes, this is screwy, but it's the way it is.
Thanks Philip.. No telling what other dopey things I've been thinking
that are not what I think they are. Maybe somewhat screwy about that
greedy non-greedy setup but, still, that match operator is a real work
horse. And one of the reasons procmail is such a sturdy little tool.
You may want to pick up the O'Reilly "Master Regular Expressions" book,
written by Jeffery Friedl. While my copy isn't well-thumbed, that's
only because I haven't had it long enough...
Believe it or not, I've owned that book for at least 2 years, maybe
more. When I first got it, I soon found it was way over my head at
that time. I tried again a few times and am seeing more that I can
follow as time goes on. Still not able to read it thru and understand
it all. And in fact I sort of gave up on it.. Maybe I'll pick it
back up now. My formal education ended in 9th grade and the following
35 years of heavy construction work allowed me to earn a nice living
but didn't help much in the literacy dept.... he he.
Oh, and for the Pinocchio effect: I use the monster regexp towards the
back of the book on a daily basis and am now finding it too simplistic
for my needs..... That squeaking sound you hear is my nose growing.
procmail mailing list