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

Peter Arnold arnoldpj at optushome.com.au
Mon Oct 6 03:28:15 EDT 2003


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

> [ 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.

Aha.. because being https, squid is not privy to anything apart from the
server name so you can't apply ACLs to anything in the URL "path".

I guess I put an explanation of why I am doing it to clarify the overall
requirement but what I really need is info on the best way to do the RE.

<snip>

Cheers
Peter Arnold

--
* 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