in reply to How do I extract named variable names from regex string

This looks like a syslog message line. If you have access to the syslog daemon configuration and already use syslog-ng, you already have macros to split all the standard fields. Then you could pipe the payload message to your perl script. In there a split /[ =]+/ ... looks like it would yield the proper {name, value} pairs. I gather rsyslog has similar features.

Main advantage of this approach: your actions run in real-time, as the events come in.

  • Comment on Re: How do I extract named variable names from regex string