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

**URL:** <https://boards.straightdope.com/t/data-crunching-excel-filemaker-masters-needed-can-i-do-this/416670>\
**Category:** Factual Questions\
**Created:** [August 23, 2007, 6:17pm UTC](https://boards.straightdope.com/t/data-crunching-excel-filemaker-masters-needed-can-i-do-this/416670 "2007-08-23T18:17:53Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Stoid](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/stoid/32/272_2.png) [@Stoid](https://boards.straightdope.com/u/Stoid)\
**Post date:** [August 23, 2007, 6:17pm UTC](https://boards.straightdope.com/t/data-crunching-excel-filemaker-masters-needed-can-i-do-this/416670/1 "2007-08-23T18:17:53Z")

</div>

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](mailto:From:test@aol.com)  
id 915  
incoming  
outgoing  
manual  
header From:  
verb contains  
value [test@aol.com](mailto: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](mailto: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](http://cesarmillaninc.com)  
transfer :Pre-trash  
the next:

rule [From:events@goldstarevents.com](mailto:From:events@goldstarevents.com)  
id 919  
incoming  
manual  
header From:  
verb contains  
value [events@goldstarevents.com](mailto: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

---

<div class="post-metadata">

**Author:** ![UncleRojelio](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/unclerojelio/32/3160_2.png) [@UncleRojelio](https://boards.straightdope.com/u/UncleRojelio)\
**Post date:** [August 23, 2007, 6:25pm UTC](https://boards.straightdope.com/t/data-crunching-excel-filemaker-masters-needed-can-i-do-this/416670/2 "2007-08-23T18:25:16Z")

</div>

This might be overkill, but you could try [Flex](http://en.wikipedia.org/wiki/Flex_lexical_analyser). 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.

---

<div class="post-metadata">

**Author:** ![Stoid](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/stoid/32/272_2.png) [@Stoid](https://boards.straightdope.com/u/Stoid)\
**Post date:** [August 23, 2007, 6:26pm UTC](https://boards.straightdope.com/t/data-crunching-excel-filemaker-masters-needed-can-i-do-this/416670/3 "2007-08-23T18:26:32Z")

</div>

[QUOTE=UncleRojelio]  
This might be overkill, but you could try [Flex](http://en.wikipedia.org/wiki/Flex_lexical_analyser). Looks to me that each line begins with identifiable symbols that Flex could look for then spit out the tokens (values) associated with them.  
[/QUOTE]

Important note: I’m on a Mac…

and that looks scary!

---

<div class="post-metadata">

**Author:** ![UncleRojelio](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/unclerojelio/32/3160_2.png) [@UncleRojelio](https://boards.straightdope.com/u/UncleRojelio)\
**Post date:** [August 23, 2007, 6:29pm UTC](https://boards.straightdope.com/t/data-crunching-excel-filemaker-masters-needed-can-i-do-this/416670/4 "2007-08-23T18:29:47Z")

</div>

[QUOTE=Stoid]  
Important note: I’m on a Mac…

and that looks scary!  
[/QUOTE]

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](http://en.wikipedia.org/wiki/Grep).
