Does anyone know how to find and replace text inside a file with Phing?
If you don't want to copy files and just replace a string in the current folder where your files reside, do a reflexive task:
<reflexive>
<fileset dir=".">
<include pattern="*.js" />
</fileset>
<filterchain>
<replaceregexp>
<regexp pattern="SEARCH" replace="REPLACEMENT"/>
</replaceregexp>
</filterchain>
</reflexive>