in reply to Match a Range of IP's

[1-99] is a character range, not a number range, so it'll match 1 .. 9 or 9 (i.e. it's the same as [1-9]).

One solution is to use [1-9]\d? instead, which will match 1 .. 9 and any two-digit number (but if you ever get IP addresses of the form "001" this will fail).

A better option would be to use (\d+) and add " && $1 >= 1 && $1 <= 99" to the end of the line; bear in mind that that will run into trouble if you have multiple IP addresses per line because of your /g though...