regexp.ReplaceAllString
sed -i
And you can use the $ notation like with perl -p -i -e for the fields that were replaced.
$
perl -p -i -e