Problem with regular expression.

Jonathan Hursey jonathan.hursey at adrevolution.com
Sun Jun 24 09:37:49 CEST 2012


:) glad to help.

On Sun, Jun 24, 2012 at 12:19 AM, Abraham Cruz Sustaita <
abraham.sustaita at buscacorp.com> wrote:

> Thanks a lot. It works!
>
> 2012/6/23 Jonathan Hursey <jonathan.hursey at adrevolution.com>
>
>>  "\.(flv|mp4|jpg|xml|png|gif)(\?[a-z0-9]+)?"
>>
>>
>> On Sat, Jun 23, 2012 at 11:59 PM, Abraham Cruz Sustaita <
>> abraham.sustaita at buscacorp.com> wrote:
>>
>>> I have in my system this two kind of url's for files:
>>>
>>> http://site.com/img.jpg
>>> http://site.com/img.jpg?123
>>>
>>> I have this regular expression:
>>>
>>>   if (req.http.Host == "s3.files.fileserver.com" && req.url ~
>>> "\.(flv|mp4|jpg|xml|png|gif)(\?[a-z0-9]+)$") {
>>>   }
>>>
>>> but it only match the second one. How should I change it so it can match
>>> both urls?
>>>
>>> Thanks in advance.
>>>
>>>
>>> _______________________________________________
>>> varnish-misc mailing list
>>> varnish-misc at varnish-cache.org
>>> https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
>>>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20120624/68efe6bc/attachment-0001.html>


More information about the varnish-misc mailing list