You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

replaceregexp.xml 583 B

1234567891011121314151617181920212223
  1. <project name="test" default="def" basedir=".">
  2. <target name="def">
  3. <fail>This build file should only be run from within the testcase</fail>
  4. </target>
  5. <target name="setup">
  6. <copy file="replaceregexp.properties" tofile="test.properties" />
  7. </target>
  8. <target name="testReplace" depends="setup">
  9. <replaceregexp file="test.properties" byline="true">
  10. <regexp pattern="Old(.*)=(.*)" />
  11. <substitution expression="NewProp=\1\2" />
  12. </replaceregexp>
  13. </target>
  14. <target name="cleanup">
  15. <delete file="test.properties" />
  16. </target>
  17. </project>