<copy todir="${classes}">
<filterchain>
<striplinecomments>
<comment value="&lt;!--"/>
</striplinecomments>
</filterchain>
<fileset dir="src" includes="*.xml"/>
</copy>我用ant的StripLineComments之能去xml中的注释,发现<!--前面没空格或tab才能去掉。
于是用一regexp去注释,请问不包含<!--的正则表达式怎么写?有空得好好学学正则了。<copy todir="${classes}">
<filterchain>
<linecontainsregexp>
<regexp pattern="..."/>
</linecontainsregexp>
</filterchain>
<fileset dir="src" includes="*.xml"/>
</copy>