Yeah, I agree that it depends on exact requirements. I thought it was worth mentioning though, because it's such a simple pattern that I would be worried about it popping up elsewhere in the data.
When's the last time you used duct tape on a duct? --Larry Wall
Comment on Re^4: Efficient way to replace a set of values with another set of values