- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
02-19-2018 09:00 PM
Dear experts!
I'm trying to compile a match which matches the following regexp: (debug|monitor).(global|level|pcap|detail\.enable) but it seems like it does not support capturing groups. I've searched for a manual for the match command but struck out.
The end game here is to use it to filter show system state to capture lines containing:
Looks like capture lists is supported, ie. show system state | match debug.[glp] but capturing groups is what I need.
Does anyone here have a solution or tip?
Kind regards,
Patrik
02-20-2018 04:15 PM
Looks like you were already pretty close, you needed to escape the pipe. This seems to work for me:
show system state | match debug.[glp]\|monitor.detail.enable
More broadly, you could probably use although it gets a bit unwieldy after enough entries.
show system state | match debug.g\|debug.l\|debug.p\|monitor.detail.e
Good luck!
Greg
02-20-2018 04:15 PM
Looks like you were already pretty close, you needed to escape the pipe. This seems to work for me:
show system state | match debug.[glp]\|monitor.detail.enable
More broadly, you could probably use although it gets a bit unwieldy after enough entries.
show system state | match debug.g\|debug.l\|debug.p\|monitor.detail.e
Good luck!
Greg
02-20-2018 05:05 PM
Thank you so much Greg.
They really need to improve their documentation in this part. And I need to improve my brain.
Can't believe I did not try that. 🙂
/Patrik
02-20-2018 07:25 PM
Thanks Greg! Huge help for us.
Click Accept as Solution to acknowledge that the answer to your question has been provided.
The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!
These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!
The LIVEcommunity thanks you for your participation!