procmail
[Top] [All Lists]

Matching two or more spaces

1996-01-31 02:52:02
I'm obviously overlooking something simple, but I seem to be stuck.
In the following recipe, I'm trying to allow a variable amount of
whitespace between the word "digest" and the number.  However,
if exactly one space is given, it matches as expected, whereas if
two spaces are given, we get an empty MATCH.  What am I doing wrong?
Within the square brackets in the regexp are a space and a tab, but
the result is the same with "digest( )+\/.*", with or without the ().

---------succeeds with one space------------
        GETTING=$MATCH
Assigning GETTING=digest 98

        :0
        * GETTING ?? digest[    ]+\/.*
Assigning MATCH=
Matched "98"

----------fails with two spaces----------------
        GETTING=$MATCH
Assigning GETTING=digest  98

        :0
        * GETTING ?? digest[    ]+\/.*
Assigning MATCH=
Matched ""

Thanks,
jimo(_at_)eskimo(_dot_)com

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