Hello, everyone,
I want to replace a given pattern in a html file with some expression, I'm
using regexp. The problem is, that my script replaces only one expression
per line, in case of 2 expressions to be replaced on one line, it doesn't
work.
Here is the target:
<target name="Regular expr example">
<replaceregexp flags="g" byline="true">
<fileset dir="${some folder}">
<include name="**/*.html"/>
</fileset>
<regexp pattern="<a
href="./(\w+)/(.*).html">" />
<substitution expression="<a href="./
\2.html">" />
</replaceregexp>
</target>
And here is a line from html, containing two matchs:
<td class="chart"> ./junit-count-chart.html Count /
./generated_reports/junit-rate-chart.html Rate </td>
I've set flags to g=global, but still not working. I've tryed all flags...
It only replaces the first regexp on the line.
Thanks for your help.
--
View this message in context:
http://old.nabble.com/replaceregexp-task-tp29031606p29031606.html
Sent from the Ant - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]