I have two three wan providers (with more or less dynamic IPs) and one item which is called Network_WAN_IP (from How to monitor a dynamic WAN IP address) that is getting frequently updated. I would like to get the first three digits of the Network_WAN_IP into a new item. With the first three digits of the IP address I could map the ISP to it in the rules.
My question is how can I use regex or json transformation to get the first three digits of the IP address into a new item i.e. Network_WAN_IP_short?
i.e. Network_WAN_IP is 22.214.171.124, Network_WAN_IP_short would be 194. ISP would be “Sunrise” then
i.e. Network_WAN_IP is 126.96.36.199, Network_WAN_IP_short would be 77. ISP would be “upc” then
Please advise how I could get started on this…