What you can do is define a simple space script function and use that for sorting (I asked ChatGPT to help with this, so I’m sure there’s a better way, this seems to work though):
```space-script
silverbullet.registerFunction({name: "sortableIp"}, ip => {
return ip.split('.')
.map(octet => ('000' + octet).slice(-3)) // Pad each octet with leading zeros and take the last three digits
.join('.');
});
```
Then in your query you can use order by sortableIp(ip)