网络接口选择的正则表达式

2024-09-28 21:57:25 发布

您现在位置:Python中文网/ 问答频道 /正文

我需要帮助找到单独使用正则表达式接口。在

!
interface Loopback0
 ip address 152.135.2.2 255.255.255.255
!
interface Port-channel1
 description *** 2 port Etherchannel to ic***
 switchport
 switchport mode trunk
!
interface FastEthernet1
 vrf forwarding mgmtVrf
 no ip address
 speed auto
 duplex auto
!
interface TenGigabitEthernet3/1
!
interface Vlan1
 no ip address
!
interface Vlan42
 ip address 10.2.2.3 255.255.255.240
 standby 42 ip 10.2.2.31
 standby 42 priority 105
 standby 42 preempt
!
interface GigabitEthernet6/48
 description ***connected to Panel***
 switchport access vlan 10
 switchport mode access
 spanning-tree portfast
!
interface GigabitEthernet7/1
!

我尝试使用下面的语法,但是它显示了所有不匹配的接口信息

^{pr2}$

我在寻找下面的结果。在

interface FastEthernet1
interface GigabitEthernet6/4
interface GigabitEthernet7/1

Tags: tonoipautoaccessaddressmodedescription