I need to find '<id' and replace it with <cache usage="read-write"/>
and my current code is below. So, if any one can help me how to modify my code for replacement, then it would be great
<target name="change-id" depends="gen-hbm">
<regexp id="id.regexp" pattern='<id' />
<replaceregexp replace='somethingssomething\n^?id'>
<regexp refid="id.regexp" />
<fileset dir="${dest.dir}">
<include name="**/*.hbm.xml" />
</fileset>
</replaceregexp>
</target>
and my current code is below. So, if any one can help me how to modify my code for replacement, then it would be great
<target name="change-id" depends="gen-hbm">
<regexp id="id.regexp" pattern='<id' />
<replaceregexp replace='somethingssomething\n^?id'>
<regexp refid="id.regexp" />
<fileset dir="${dest.dir}">
<include name="**/*.hbm.xml" />
</fileset>
</replaceregexp>
</target>