Updated Regex class and tests