so my naive implementation is so much faster than using plain regexes. hrm.