Mailing List Message #6442
From: Kreme <>
Subject: Re: Accounf file format
Date: Fri, 07 Jul 2000 11:18:46 -0600
To: SIMS Discussions <>
X-Mailer: QUALCOMM Windows Eudora Version 4.3.1
At 17:28 7/7/2000 +0200, you wrote:
In regex notation the mailbox file looks like this:

(^From .*\r(.+\r)*\r(.*\r)*\r)*
  ^        ^       ^        ^

The carets denote in order the start of the message in BSD format, the
start of the RFC822 message, the start of the body, and the end of the BSD
and RFC822 message.

Clear? I hope so.

Hmm, no :-)

When i do that i got a array:
1 row is: whole mailfile, start 1, 13004 (whole file)
2 row is: none, start 0, 0
3 row is: 3 line in the middle of the whole file, start 12844, 160
4 row is whole file (should be that)

Then something is wrong with your regex implementation.

(^From .*\r  -> This should grab a SINGLE line.  In English it says, "look for the string 'From ' at the start of a line and then grab it and any other characters up to a return."

After that I start to get a little lost myself.  I believe this part:


is grabbing any number of characters until there are two consecutive line feeds and storing them.

(.+\r) is one or more characters ending with a return, and the *\r says 0 or more instances of the previous expression.

Subscribe (FEED) Subscribe (DIGEST) Subscribe (INDEX) Unsubscribe Mail to Listmaster