Hi;

David Thorburn-Gundlach wrote:
> % I suggest therefore the following: Use "X?funny" as regexp.  There is
> % one upper case letter in and it matches all messages containing
> % "funny" and no others... It worked fine with my 2 versions of mutt.
> 
> Sounds great.  Um, how does it work?  I see the upper case letter,
> that makes it case-sensitive, and then the ? says "zero or one".

Yep.

> Theoretically, then, I'd find both "funny" and "Xfunny", right?

Sure, but as I understood it in your first mail on this subject, you
need to find "funny" (case sensitive) somewhere in the subject and not
as the complete subject.

Then it makes no difference, because the (case sensitive) regexp
"funny" would match "Xfunny" and "funny" as well as "X?funny" does.

But if you need to whole subject to match "funny" and *only* "funny",
you should have a (case sensitive) regexp "^funny$".

> That's cool enough, since I can probably find a single upper-case
> letter that I could avoid -- or could even write something like
>       '(ABCX)?funny'
> to increast my odds of a "clean" match...

OK, so you want to match "funny" against the complete subject.

> Do I have it right?

You need to add a "^" ath beginning and a "$" at the end of the
regexp, e.g. like this:

        "^(ABCX)?funny$"

That would match a subject "ABCXfunny" or "funny" and nothing else,
that means it would *not* match "this is funny" or "Xfunny".

                Regards, Axel
-- 
Axel Beckert - [EMAIL PROTECTED] - http://w5.cs.uni-sb.de/~abe/
Dept. of Computer Science, University of Saarland (Germany)
Artificial Intelligence Laboratory (AI Lab), Prof. Dr. W. Wahlster;
WWW-Administrator IBFI Schloss Dagstuhl; Students Representative

Reply via email to