【发布时间】:2020-01-11 11:48:54
【问题描述】:
我想在网络交换机配置行中找到一个用引号括起来的密码,但没有成功。有人可以帮忙吗?例如:我在配置中有一行:
set snmp v3 usm local-engine user Admin authentication-sha authentication-key "$aBCd./!Test"
我写了一个这样的正则表达式,但它不起作用。
^set\s\snmp\sv3\s\usm\slocal-engine\suser\sAdmin\sAuthentication-sha\sauthentication-key\s[0-9A-Za-z$./!.*+]
^set\s\snmp\sv3\s\usm\slocal-engine\suser\sAdmin\sAuthentication-sha\sauthentication-key\s[0-9A-Za-z$./!.*+]
什么都不显示
【问题讨论】:
标签: regex powershell