2012/11/3 Christopher Schultz <ch...@christopherschultz.net>: > > I was looking at the Javadoc for RemoteIpValve's internalProxies > attribute and I saw this comment: > > " > 172.16/12 has not been enabled by default because it is complex to > describe with regular expressions. > " > > I'm not sure that is true. This regex ought to do it: > > 172\.(1[6-9]|2(5[0-5]|[6-9])|[3-9][0-9])\.\d+\.\d+ > > Any takers? >
That "2(5".. part is strange and wrong. What you are trying to do with it? According to Wikipedia [1], the range is 172.16.0.0 - 172.31.255.255 So maybe 172\.(1[6-9])|(2\d)|(3[01])\.\d\d?\d?\.\d\d?\d? That will be 16-19, 20-29, 30-31 for the second byte. (I'd be better to have some unit tests, to be sure). [1] http://en.wikipedia.org/wiki/Private_network#Private_IPv4_address_spaces Best regards, Konstantin Kolinko --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org