in reply to can substitution operator replace text with value returned from function?
s/__AMOUNT__/format_number($amount)/eg; [download]