 	                                        paddingNum, 
 	                                        paddingChar);
 	                    }else{
-	                        match.replacement = padString(replacementValue.toString(), paddingNum, paddingChar);
+	                        match.replacement = padString(String(replacementValue), paddingNum, paddingChar);
 	                    }
 	                }else if (formater == INTEGER_FORMATER){
 	                    match.replacement = padString(int(replacementValue).toString(), paddingNum, paddingChar);

                match.endIndex = match.startIndex + match.length;
                match.content = String(result[0]);
                // try to get substitution properties
                formater = result.formater;
                varName = result.var_name;
                precision = result.precision;
                padding = result.padding;
				paddingNum = 0;
				paddingChar = null;
                //trace('formater:', formater, ', varName:', varName, ', precision:', precision, 'padding:', padding);

	                }else if(DATES_FORMATERS.indexOf(formater) > -1){
	                    switch (formater){
	                        case DATE_DAY_FORMATTER:
	                            match.replacement = replacementValue["date"];
	                            break;
	                        case DATE_FULLYEAR_FORMATTER:
	                            match.replacement = replacementValue["fullYear"];
	                            break;
	                        case DATE_YEAR_FORMATTER:
	                            match.replacement = String(replacementValue["fullYear"]).substr(2, 2);
	                            break;
	                        case DATE_MONTH_FORMATTER:
	                            match.replacement = String(replacementValue["month"] + 1);
	                            break;
	                        case DATE_HOUR24_FORMATTER:
	                            match.replacement = replacementValue["hours"];
	                            break;
	                        case DATE_HOUR_FORMATTER:
	                            var hours24 : Number = replacementValue["hours"];
	                            match.replacement =  (hours24 -12).toString();
	                            break;
	                        case DATE_HOUR_AMPM_FORMATTER:
	                            match.replacement =  (replacementValue["hours"]  >= 12 ? "p.m" : "a.m");
	                            break;
	                        case DATE_TOLOCALE_FORMATTER:
	                            match.replacement = Date(replacementValue).toLocaleString();
	                            break;
	                        case DATE_MINUTES_FORMATTER:
	                            match.replacement = replacementValue["minutes"];
	                            break;
	                        case DATE_SECONDS_FORMATTER:
	                            match.replacement = replacementValue["seconds"];
	                            break;    
	                    }
	                }else{
	                   //no good replacement
