Training
Bootcamp
Courses
Tech Sessions
Resources
Blog
Tips
GitHub
YouTube
Newsletter
Playgrounds
Pricing
Sign In
Become Member
TextFSM Parser
Validate and test the parsing of your TextFSM templates
Tools
J2 Renderer
TTP Parser
TextFSM Parser
XPath Tester
Members Only
JMESPath Validator
JSON Schema Validator
Data Format Converter
TextFSM Template
Value Group (\d+) Value PortChannel (Po\d+) Value Ports (Gi\d/\d) Start ^${Group}\s+${PortChannel}.*${Ports}
0
/ 20000
Raw Text
我现在要写一个textfsm的模板, 要抓取出端口号 内容如下 Number of channel-groups in use: 2 Number of aggregators: 2 Group Port-channel Protocol Ports ------+-------------+-----------+----------------------------------------------- 1 Po1(SD) LACP Gi1/0(s) Gi1/1(s) Gi1/2(s) Gi1/3(s) 2 Po2(SD) LACP Gi2/0(s) Gi2/1(s) Gi2/2(s) Gi2/3(s)
0
/ 20000
Result
[ { "Group": "2", "PortChannel": "Po2", "Ports": "Gi2/2" } ]
Parse
Share
Auto-Sync