Fix for curRegex called before assignment issue that was pointed out to us.