ok what i understand is in the posix regular expression you encode special characters . ? + ( ) with a back slash only and no need of (single quote+backslash) is required which is a must in grep. regards, Bilal Aslam ---------------------------------------- > Date: Wed, 16 Jun 2010 23:11:08 +1200 > From: squid3@xxxxxxxxxxxxx > To: squid-users@xxxxxxxxxxxxxxx > Subject: Re: 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: Trusted email with powerful SPAM protection. https://signup.live.com/signup.aspx?id=60969