【发布时间】:2012-08-02 03:41:55
【问题描述】:
我正在尝试计算文件中不包含以下行的行数:
/*================================================= */
或
Number of current users:
或 空行
我可以计算包含LIB 的行数,
<propertyregex property="noOfUsers"
input="@{line}"
regexp="Number of current users:\s*([0-9]+)$"
select="\1" />
但是,我无法推导出否定表达式。有人可以帮我解决这个正则表达式吗?
【问题讨论】:
-
查看此答案以获得解决方案 => stackoverflow.com/a/11746966/130683
标签: regex ant regex-negation regex-greedy