I haven't looked at the regex syntax, I'll need to research that a bit...
Other solutions are to create two rules, the first with the subnet range, the second with the individual IPs. You could also use a simple filter by putting each subnet("172.16.0","172.16.1"...) and the individual IP addresses.