On 15/03/07, Alan Ark wrote:
Hi Paul. Just a few notes. Here's a regex that I came up with. I used the "?" qualifier to make the regex non-greedy – which probably would have been the next thing that you ran into.
Hi Alan, thanks for the reply. Your regex string does work in IRB but still doesn't produce any results in the regex tools I downloaded. (stupid tools.) As an aside, what's wrong with reading the line, then splitting it into an
array? I think that would have been much more readable than using the regex soln. Regards -Alan
I'm thinking about going with the array solution the more I think about it. Since the actual input lines have about 20 values each, the regex just gets longer and uglier and harder to understand. I thought I would give Regular Expressions a try since I don't use them very often. I think this is one of those times when it is *not* the optimal choice for readability and maintenance! Thanks for the feedback. Cheers. Paul C.
_______________________________________________ Wtr-general mailing list [email protected] http://rubyforge.org/mailman/listinfo/wtr-general
