Multiple range for the same field

Hello,
How can i filter multiple range for the same field, in graph metrics, for example
!IP:[10.0.0.0 TO 10.255.255.254],[172.16.0.0 TO 172.16.255.254]?