Switch tz parse code and some javascript range code to regular expressions.