procmail
[Top] [All Lists]

Re: Limiting extent

2002-10-19 09:48:40
From: fleet(_at_)teachout(_dot_)org

I'm trying to identify a percent sign within a URL (ie, a percent sign
between // and the next / only).  I've been trying

//.*[%[^/]].*/ (in various permutations) with no luck.  I think I'm
close; but I'm obviously missing something.

Yes.  Well, since `.*' means essentially anything at all, then it stands
to reason that `//.*something' need not be one phrasal "word."  That is,

        //someurl.htm and so on and so forth something

will match on "//.*something".  You need to rule out whitespace.
Something like this is likely to work, with a caret, space, and tab
within the brackets:

        //[^    ]*%

I don't see a need for the trailing /, but if you insist:

        //[^    /]*%[^  ]*/

-- 
dman

_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

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