【发布时间】:2013-12-24 17:29:56
【问题描述】:
我在一个更大的配置中有以下字符串:
as-path-set DAVE-9999-CBG
as-path-set DAVE-9999-CBG
as-path-set DAVE-55555-CBG
as-path-set DAVE-44444-CBG
as-path-set DAVE-33333-CBG
as-path-set DAVE-11111-CBG
as-path-set DAVE-22222-CBG
我想为包含 9999 的行匹配所有这些行 except。我不太了解否定正则表达式,无法完成这项工作。有人可以帮忙吗。理想的输出是:
as-path-set DAVE-55555-CBG
as-path-set DAVE-44444-CBG
as-path-set DAVE-33333-CBG
as-path-set DAVE-11111-CBG
as-path-set DAVE-22222-CBG
【问题讨论】:
-
数字总是重复还是
as-path-set DAVE-13547-CBG可能匹配?文字总是一样的吗?as-path-set DAVE-99999-CBG可能吗?