vlan_outcome的内容
show int description | include Vl[0-9]+
Vl1 admin down down
Vl150 up up
如何将以下正则表达式放入变量中?
var1 = Vl1 var2 = admin down var3 = down
war2 = Vl150 war3 = up war3 = up
更正确地说,我希望分配发生(var1 = Vl1 或 war1 = Vl150)只有当它们的状态出现在两列时
到目前为止,我正在尝试并尝试失败:
foreach element [ split $vlan_outcome "\n" ] {
#regexp (Vl\[0-9\]+)(\[\[:blank:\]\]+)(.*)(\[\[:blank:\]\]+)(.*) ignore vlan state1 state2
puts $element
}