This seems slightly brittle to me. I'd rather we attempt to parse the pattern. See http://bit.ly/13DPmPj