add isFloat, escapeRegExp, extracted regexes to locals