我需要在文件替换多行字符串,就像这样:
startString
bla bla bla
...
endString
蚂蚁replaceregex。 蚂蚁的代码:
<copy file="${file}" tofile="${newFile}" overwrite="true">
<filterchain>
<replaceregex pattern="startString(.+)endString" replace="zzz" flags="gmi" byline="true"/>
</filterchain>
</copy>
如果文本替换为单行 - 正确的所有作品,但是当文字多 - replaceregex不起作用。 我应该在我的代码修复?