[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Getting the right dictionary for e-mail and newsgroup messages
From: |
Cecil Westerhof |
Subject: |
Re: Getting the right dictionary for e-mail and newsgroup messages |
Date: |
Wed, 06 Jan 2010 16:47:50 +0100 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.3 (gnu/linux) |
Ted Zlatanov <tzz@lifelogs.com> writes:
>>> (string-match "\\bnl\\b" "X.nl.X")
>
> CW> This also matches:
> CW> (string-match "\\bnl\\b" "X-nl-X")
>
> CW> But I do not think that is a problem.
>
> I think you can modify the syntax table to accomodate this, making '-' a
> member of the word class, but you have to check the manual for the
> details.
I would need to put a lot more in the word class, because the original
problem was that before nl needs to be a '.' or the beginning of the
line and after a '.' or the end of the line. So in principal the regular
expression is to lenient, but the chance that it is a real problem is
very small. When that is the case, I need to use my original expression
again. But it is used for parsing newsgroup names, so I think the
expression is good enough.
--
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof