I have a device that is sending important information to Spectrum via key value pairs. I need to pull out the values so that I can present the value separate from the full string and also so that I can perform rules based on the value in specific key value pairs.
For example, lets say event variable 110 has the following data
"host=somefqdn
tgn=3301, cic=91
cause=parse error
message=some batter information should be here"
So, I need to pull out tgn and present it as a separate event variable so that I can show it in the alarm display as Trunk Group = {the value that I pull from tgn=}
I need to pull the information from cause= to use as part of a dynamic alarm title.
I have tried event procedures with GetRegexp, but the best that I can do is to get the entire key=value and what I want is the value.
example:
GetRegexp(GetEventVariable({U 110}), {S \"tgn=(\S*).*\"}, {U 0}) will give me "tgn=3301". Then when I try to switch it to GetRegexp(GetEventVariable({U 110}), {S \"tgn=(\S*).*\"}, {U 1}) so that I get the contents of group #1 (\S*) I get errors in the event error file and it completely fails.
The interesting thing is if I try this in various regex testers, it works. I just can't seem to figure out how to do this in an EventProcedure.
Any suggestions?