How to calculate matched groups in value mapping

Hi,

I have a field like “IP1,IP2,IP3,IP4,…”, I need to replace the field with the number of IPs. For example, if the field is “192.168.1.1,198.168.2.2,198.168.3.3”, I need to replace this field with “3 IPs”. If the field is “192.168.10.1,198.168.22.2,198.168.43.3,198.168.43.4”, replace it with “4 IPs”. How to make it?

Thanks

What is your datasource

influxdb

So is it only one field or mutiple fields?

Also are you using influxql or flux query language

only one field. I’m using influxql