[H-GEN] Help with Regular Expressions in javascript?

Harry Phillips harry at tux.com.au
Mon Oct 6 01:32:51 EDT 2003


[ Humbug *General* list - semi-serious discussions about Humbug and     ]
[ Unix-related topics. Posts from non-subscribed addresses will vanish. ]

Peter Arnold wrote:
> 
> I'm trying to include a Regular Expression javascript in my proxy.pac file
> that filters various contraband from (particularly https:) webmail sites
> but I'm strugling somwhat.
> 
> I'd like to filter any (eg) .exe .doc .com .pif files based on their
> appearance in the url 1) intermediatly or 2) at the end.
> 
> The best I can do is:
> 1) var contraband = /\.(exe|doc|com|pif)/i;
> 2) var contraband = /\.(exe|doc|com|pif)$/i;
> 
> This is later run in against the url to return  or 1
> 
> The above dosn't seem to be working (it's rather hard to check) so I'd
> appreciate ideas, alternatives on the RE's above.
> 

I probably don't understand the question but why don't you setup squid 
and ban those type of objects? I am pretty sure it can do that.

-- 
Regards,
Harry Phillips
--- Failure is not an option,
     it comes bundled with your Microsoft product.


--
* This is list (humbug) general handled by majordomo at lists.humbug.org.au .
* Postings to this list are only accepted from subscribed addresses of
* lists 'general' or 'general-post'.  See http://www.humbug.org.au/



More information about the General mailing list