【发布时间】:2016-12-23 11:00:39
【问题描述】:
我想在 ant 脚本上使用 replaceregexp 将所有源代码转换为 windows 行,但是对于更多组合我尝试失败了。
我已尝试使用下一个代码,但它会打印文字“rl”:
<replaceregexp match="\n" replace="\r\n" flags="g" byline="false" >
<fileset dir="${src}">
<include name="**/*.java" />
</fileset>
</replaceregexp>
我不能使用 ${line.separator},因为我正在从 linux 执行 ant 脚本,所以它被评估为 \n。
可以吗?怎么样?
【问题讨论】: