Data crunching! Excel, Filemaker masters needed! Can I do this?

This is a problem I have run into a number of times and it just seems that there ought to be a way to make it work.

I am trying to chunk data…that’s my term. Creat records, essentially. The data is in a text file. Rather than being delimited by tabs or spaces or anything else normal, each individual piece of data exists on a line of its own. Now, if each complete “record” were precisely the same number of lines, I could probably make that work without too much agony. Even if each complete record had the same starting or ending info, I might be able to make it work. But it doesn’t. So I’m stumped about how to structure or manipulate it so that I can actually create records.

Let me show you (what I’m working with currently is text extracted from my Eudora Filters…I have so many that my mail is a mess and I can’t figure out what’s what. However bizarre it is of me, I’d like to pullo that informaiton into either Filemaker or Excel and be able to search it for repeats, sort it, see what’s conflicting with what, none of which is possible in Eudora itself…very annoying. If anyone knows of a program that will do this for me, that would be great. But I’d still like this question answered because I’ve run across it in other contexts.)

Record one is:

rule From:test@aol.com
id 915
incoming
outgoing
manual
header From:
verb contains
value test@aol.com
conjunction unless
header Body
verb contains
value boogers
transfer : RetroRelated:Content Related:Andreas
sound Frog
personality test personality
label 4
mvattach 7693090
the next record, which starts on the very next line, is:

rule Any Recipient:Gfone
id 884
outgoing
manual
header Any Recipient
verb contains
value Gfone
transfer :AFriends:Greggy
reply AA Password Request
redirect TESTING@TESTING.COM
speak 3 1836346163 50
stop
And the next:

rule From:cesarmillaninc.com
id 829
incoming
manual
header From:
verb contains
value cesarmillaninc.com
transfer :Pre-trash
the next:

rule From:events@goldstarevents.com
id 919
incoming
manual
header From:
verb contains
value events@goldstarevents.com
transfer :Events in LA
stop
and so forth.

Now, there is a max of 5 actions for any filter, but as you can see, there are many possible parts to any given action as well as parts to the rules.

So, Data crunchers Extraordinaire…any help you can offer on how to parse this puppy? (FYI: ;the total number of rows in the file is nearly FOUR THOUSAND! Crazyness…)

Than

stoid

This might be overkill, but you could try Flex. Looks to me that each line begins with identifiable symbols that Flex could look for then spit out the tokens (values) associated with them.

It’s been a long time since I’ve worked with Lex though.

Important note: I’m on a Mac…

and that looks scary!

If you are on a Mac then Flex (and/or Lex) comes with the Developer Tools. You might be able to do something with AppleScript (or your personal favorite script language) and grep.