Reputation: 10496
Trying to match any private ipV4 address that start with 10
and optionally ends with CIDR notation omitting default gateway, such as:
10.123.123.123 match
10.12.123.1 do not match
because it ends with .1
=> default gateway
10.12.123.2 match
10.123.123.123/23 match
What i have for now is matching private ip address that start with 10
'10\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}'
which will allow default gateway and will not match CIDR
Upvotes: 0
Views: 289