1
指定的文件prep.js與內容:如何用第一部分替換文件?
head
middle
tail
而且build.xml文件:
<?xml version="1.0" encoding="UTF-8"?>
<project name="abc" default="build">
<target name="build">
<replaceregexp file="./prep.js"
match="(.*)(middle)(.*)"
replace="\1"/>
</target>
</project>
運行 「蟻族」 離開文件prep.js有:
head
tail
但我預計:
head
我如何獲得我期望的?
只需添加flags =「s」解決了它。謝謝! – 2014-12-01 20:59:00