Re: OT regex question. Sorrry!

[email protected] Mon, 17 Jun 2013 15:35:44 -0400
Newsgroups gmane.mail.spam.crm114
Message-ID <[email protected]>
"Eric d'Halibut" <[email protected]> writes:

Hmmm... I think I know the problem.

The parser that does priolist.mfp (and others) is pretty
stupid - it just looks for embedded spaces in the text.

However, I'm surprised that NFG\sFOAD didn't work.

Let me think on this.  Maybe try NFG\0x20FOAD or the equivalent?

I'm trying to remember the order in which things get constructed.

And doubly worse, I'm looking at mailreaver.crm, line 502 and
onward, where priolist.mfp gets checked.  The parsing 
regex for priolist entries is:

    match <fromend nomultiline> (:w: :pm: :pat:) [:priolist:]  /(.)(.+)/

and then on line 505, uses the captured :pat: as a match against
the (anonymous) incoming mail:

    match <nomultiline> (:reason:) /:*:pat:/

which _should not care_ if there are embedded spaces.  Very odd.

(and - has anyone built TRE with static libs?  I'm having
trouble with that myself; I would have released a new
version if that wasn't blocking me.  I don't want to release
what I've not tested.)

   - Bill




> I want to put expressions in priolist.mfp to test for occurrences of
> two particular words separated by a space, e.g. "SUPER DISCOUNT" or
> "NFG FOAD".
>
> Googling for this I find a lot of answers of the form "this should
> work." But no joy so far.
>
> I have tried, among others now long forgotten:
>
> -^\NFG\s\FOAD\$
>
> and
>
> -[NFG" "FOAD]
>
> I am having trouble focusing my eyes now, so many regexes have floated
> past them, but iirc both of these attempts matched every mail
> processed by priolist.mfp.
>
> Any help gladly received!

------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev