Hi Amos,
 
There is still some confusion regarding regex and any help will be great please.
 
 
you told that squid uses posix regex but is it BRE or ERE???
 
as for ERE according to my best understanding special characters are not 
required to be escaped and if escaped then will lose there special meaning and 
on the contrary in BRE some special characters like ( ) must be escaped 
otherwise they will be treated as literals.
 
 
If the regex processor is built on the squid itself or it is using the os 
default regex parser?
 
 
thanking you &
 
 
regards,
 
Bilal
 


----------------------------------------
> Date: Wed, 16 Jun 2010 23:11:08 +1200
> From: [email protected]
> To: [email protected]
> Subject: Re: [squid-users] Confusion regarding regex
>
> GIGO . wrote:
>> Hi,
>>
>> Please need your guidance regarding the regex used by squid. Is it bre ere 
>> or perl? I assume that squid using a gnurep compatible version? Am i right?
>>
>
> POSIX regular expressions.
>
>>
>> In grep to use some metacharacter we have to encode it which are ‘\?’, ‘\+’, 
>> ‘\{’, ‘\|’, ‘\(’, and ‘\)’ does this hold true to write regex for squid as 
>> well?
>>
>
> Yes. I know for at least these: \. \? \+ \( \)
> Not sure about the others.
>
>> acl MP3url urlpath_regex \.mp3(\?.*)?$ isnt this expression should be 
>> written as \.mp3'\(''\?'.*'\)''\?'$
>
> No. It means the text ".mp3" ending the path (aka the MP3 file
> extension), with optional query string parameters following.
>
> Which matches URI standard syntax:
> protocol ':' '/' '/' domain '/' path '?' parameters
>
>
> Amos
> --
> Please be using
> Current Stable Squid 2.7.STABLE9 or 3.1.4                                     
>   
_________________________________________________________________
Hotmail: Powerful Free email with security by Microsoft.
https://signup.live.com/signup.aspx?id=60969

Reply via email to