tôi cần thay thế chuỗi multiline trong tập tin, như thế này:kiến replaceregex thay multiline
startString
bla bla bla
...
endString
bởi replaceregex kiến. đang Ant:
<copy file="${file}" tofile="${newFile}" overwrite="true">
<filterchain>
<replaceregex pattern="startString(.+)endString" replace="zzz" flags="gmi" byline="true"/>
</filterchain>
</copy>
Nếu văn bản cho thay thế là đơn dòng - tất cả các công trình chính xác, nhưng khi văn bản là multiline - replaceregex không hoạt động. Tôi nên sửa lỗi gì trong mã của mình?
Xin cảm ơn, nó hữu ích cho tôi – Alexey