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="&lt;a 
href=&quot;./(\w+)/(.*).html&quot;&gt;" />
                        <substitution expression="&lt;a href=&quot;./ 
\2.html&quot;&gt;" />
                </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: user-unsubscr...@ant.apache.org
For additional commands, e-mail: user-h...@ant.apache.org

Reply via email to