Does anyone know how to find and replace text inside a file with Phing?
I was looking for the same thing, and I found out that exists a filter named ExpandProperties which allows to replace properties in the copied file. For example I used it in a apache virtual host template:
And in the template file
DocumentRoot "${application.startdir}/public"
ServerName ${apache.default.host}
Options Indexes MultiViews FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
In this way you don't need to explicitly list all the tokens you want replaced, pretty useful...