On Tue, 16 Nov 2010, Josh Paetzel wrote:

> On Tuesday, November 16, 2010 11:01:02 am Mike Miller wrote:
>
> <snip>
>
> The old adage goes....
>
> I once had a problem that I thought I'd solve with a regex.
> Then I realized I had two problems.
>
> My O'RA regex book is about a thousand pages.  Fun stuff but playing 
> with regexes is pretty much a never ending optimizing game.  Eventually 
> the returns get very small compared the the effort expended, then you 
> stop, because hey, it's a multi gabigahurz system and it runs fast 
> enough....


I have that book.  I probably read a chapter once.  I use regex all the 
time in perl to do basic tasks and it presents no serious problems because 
I'm doing small jobs.  When I have to repeatedly sift through a 3 GB file, 
it's a little different and so I spent a little more time on it.  Note 
that I really didn't do anything about the regex -- I kept that the same. 
All the playing around was with the ordinary grep commands that I used as 
a filter before piping the data to the regex.  The interesting finding was 
that -f, -F and -Ff all did the same thing in my application but -Ff was 
more than 30 times faster than -f.

Mike