From: James Edward Gray II Date: 2005-10-13T02:10:10+09:00 Subject: Re: Ruby noob with a coming from Python question On Oct 12, 2005, at 11:36 AM, Kevin Ballard wrote: > > James Edward Gray II wrote: > >> If you go back and look at the original code now, I was hoping that >> would save all the random calls to strip() when Hash data is >> accessed, thought the "=" split() pattern may also need to become / >> \s*=\s*/ to get leading whitespace. >> > > Ohh, leave *off* some strips. I see what you mean. Ah, I see now. You're right, that was a terrible typo on my part! :( > Perhaps an easier solution would be to just use readlines, but then > call strip() on both key and value? That takes care of any whitespace, > whether it be leading the line, trailing, or around the equals sign. Yes, definitely. James Edward Gray II