mi <[EMAIL PROTECTED]> writes: > mi <[EMAIL PROTECTED]>: > > if(shExpMatch(url,"*.pdf") || (shExpMatch(url,"*.zip")) > > return "DIRECT"; > > > > else > > if((url.substring(0, 5) == "http:") || (url.substring(0, 4) == "ftp:")) > > return "PROXY localhost:8080; DIRECT"; > > else > > return "DIRECT"; > > }
> btw. if 'matching' works like bash "grep", it should be sth. like > > if(shExpMatch(url,"*.pdf$") > > ....right ? They are "shell expressions" and not regular expressions like used in grep. The function shExpMatch() is defined on the web page http://wp.netscape.com/eng/mozilla/2.0/relnotes/demo/proxy-live.html where it makes this clear. -- Andrew. ---------------------------------------------------------------------- Andrew M. Bishop [EMAIL PROTECTED] http://www.gedanken.demon.co.uk/ WWWOFFLE users page: http://www.gedanken.demon.co.uk/wwwoffle/version-2.8/user.html
