var str:String = "Стр1ока2 с 3цифр4ами5."; var res:String = str.replace(/\d(?!.*\d)/s, ".$&"); trace(res) // Выводит Стр1ока2 с 3цифр4ами.5.