in reply to regex for classless IP subnets

Try out NetAddr::IP. It parses the input subnet specification. Then you can use the ->contains function to look for what you want. It also has a variety of other uses.

Best regards

-lem, but some call me fokat