How do I specify wildcards in the RemoteAddrValue declaration?

The Tomcat docs says it uses the java.util.regex package, so i wrote a test
case like this:

        String patternStr = "192.168.*.*";
        String searchStr = "192.168.1.2";

        Pattern p = Pattern.compile(patternStr);
        Matcher m = p.matcher(searchStr);
        System.out.println("Does " + patternStr);
        System.out.println("Match " + searchStr);
        boolean b = m.matches();
        System.out.println("Result: " + b);

Which returns true, however when I placed patternStr into my server.xml file
(following the conventions in the Tomcat docs of escaping the "." with \ ):
<Valve className="org.apache.catalina.valves.RemoteAddrValve"
allow="192\.168\.*\.*"/>

It didn't match, ie. I couldn't get in.  I hard coded my current ip into the
above value and it worked, but I need to match any 192.168.*.* address.

How do specify this in server.xml?

Thanks

Setup:
Java 1.4.2
Tomcat 5.5

Reply via email to