[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lojban] Re: Regular expression for brivla?
On Sun, Feb 08, 2004 at 04:51:45PM +0100, Arnt Richard Johansen
wrote:
> On Sun, 8 Feb 2004, Robin Lee Powell wrote:
>
> > Is there a known regular expression that covers all classes of
> > brivla?
> >
> > What about one that's just really close?
> >
> > Perl extensions are fine.
>
> From my (admittedly poor) understanding of regexes suggest that it
> is going to be very long-winded.
The one you presented is, to my mind, an tiny itty-bitty thing.
*This* is a long one; from 'man procmailrc':
If the regular expression contains `^FROM_DAEMON' it will be substituted by `(^(Mailing-List:|Precedence:.*(junk|bulk
|list)|To: Multiple recipients of |(((Resent-)?(From|Sender)|X-Envelope-From):|>?From )([^>]*[^(.%@a-
z0-9])?(Post(ma?(st(e?r)?|n)|office)|(send)?Mail(er)?|daemon|m(mdf|ajordomo)|n?uucp|LIST(SERV|proc)|NETSERV|o(wner|ps)
|r(e(quest|sponse)|oot)|b(ounce|bs\.smtp)|echo|mirror|s(erv(ices?|er)|mtp(error)?|ystem)|A(dmin(istrator)?|MMGR
|utoanswer))(([^).!:a-z0-9][-_a-z0-9]*)?[%@>\t ][^<)]*(\(.*\).*)?)?$([^>]|$)))', which should catch mails coming from
most daemons (how's that for a regular expression :-).
> Basically, you have to look at only the first five letters,
> exclude apostrophes, and see if there are at least two
> adjacent consonants.
OK.
> This, of course, presupposes that you have already determined that
> the string you are checking is a valid Lojban word.
Any idea how to do that?
-Robin
--
Me: http://www.digitalkingdom.org/~rlpowell/ *** I'm a *male* Robin.
"Constant neocortex override is the only thing that stops us all
from running out and eating all the cookies." -- Eliezer Yudkowsky
http://www.lojban.org/ *** .i cimo'o prali .ui