IP Filtering


#1

Hello everyone
Does anyone know a way to filter a range of IP addresses>

I have a range like ###.##.#.0 - ###.##.#.255

I would like to avoid not entering 255 separate IP addresses

Thanks.


#2

Hey @kullboys12,

That’s what Regex is for. You can filter out the whole range with something like this:

^123\.45\.6\.([0-9]|[1-9][0-9]|1([0-9][0-9])|2([0-4][0-9]|5[0-5]))$

The above is just an example and you would have to write your own depending on the particular range.
The example uses 123.45.6.0 - 123.45.6.255 as the range.

Best,
Hristian