Daniel and Henning, thanks for your input. In some cases I have to compare IPs that are not PV. In those cases I'll have to use the regex operator.
Cheers,
Uriel
On Friday 26 March 2010, Uriel Rozenbaum wrote:Hi Uriel,
> I had a lot of errors so I'll just show the final version that works OK.
>
> =~ "192\.168\.([0-9]{1,3})\.([0-9]{1,3})
>
> The only drawback is that I could pass as valid 192.168.999.999 but as
> these IPs come from a DNS query, I assume they'll be fine.
thank you for sharing this. As Alex mentioned, the easier (and also probably
more faster) way is to use the src_ip construct, which 'understand' network
ranges.
Cheers,
Henning