Hello,
I am extracting a software version value through SNMP and would like to remove a dash in the returned value. The SNMP oid returns a value in this format: 1000-2000 and I would like to remove the dash so that I can use the output in a sensor factory sensor.
The scenario is like this: We have a test firewall on which we use rest api calls to extract the installed and latest software versions through xml, this works fine. In the xml rest sensor I can use the option "Characters to remove" and specify the dash, this works perfectly.
But my issue arises when I want to match the extracted latest software version against a value which I extracted from our production firewalls through SNMP. We would like to avoid using the rest api on the production devices because some performance and security issues arise when using the rest api.
So in short my question is: Can I easily remove the dash in between two number outputted by an SNMP oid? (So 1000-2000 should become 10002000)
My regular expression knowledge is very limited, I can separate both numbers in two capture groups but I need both numbers, not one half of the full version number. As far as my understanding goes I would need a replace regex construction to achieve my desired result or is there an easier solution?
Add comment