在 ant 获取多个字符串
例如,我有包含这些行的 js 文件:
<script defer src="/js/libs/ui.achtung.js"></script>
<script defer src="/js/libs/jquery.tipsy.js"></script>
<script defer src="/js/libs/jquery.mousewheel.js"></script>
我需要将这些文件连接在一起,并在此处放置一个指向新创建的文件的链接,替换现有的脚本。
所以算法是:a)用脚本读取行b)将所有脚本连接到一个c)将脚本链接替换为仅一个脚本链接
我无法找到读取多行以将它们中的每一行放置到单独的属性等的决定。 谁能帮助我吗?
I have for example the js file containing these lines:
<script defer src="/js/libs/ui.achtung.js"></script>
<script defer src="/js/libs/jquery.tipsy.js"></script>
<script defer src="/js/libs/jquery.mousewheel.js"></script>
I need to concatenate these files at one and place a link to newly created file here replacing existing scripts.
So the algorithm is a) read lines with scripts b) concatenate all scripts to one c) replace script links to only one
I cant find a decision to read multiple lines to place each of them to separate property or so.
Can anyone help me?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
要读取多行,请查看:
Ant:使用 propertyregex 获取多个匹配
示例中提取
了
with
To read multiple lines, have a look at:
Ant: get multiple matches with propertyregex
The example there extract
out of
with