s!total of (.*?) and (.*?)\n!total is $1+$2\n!g; [download]
In reply to addition in regular expressions by texuser74