Sorting an `ip_range` field based on the first IP in the network address

Is this possible to do using Painless? I've been trying to figure out a way and haven't succeeded yet.

E.g. given 3 records where the ip_range field is,,, I'd like to sort and get back:

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.