<html><body><div style="color:#000; background-color:#fff; font-family:Courier New, courier, monaco, monospace, sans-serif;font-size:10pt"><div style="font-family: 'Courier New', courier, monaco, monospace, sans-serif; font-size: 10pt; ">Hello, </div><div style="font-family: 'Courier New', courier, monaco, monospace, sans-serif; font-size: 10pt; "><br></div><div style="font-family: 'Courier New', courier, monaco, monospace, sans-serif; font-size: 10pt; ">Is there any way to get variable from regex and setup ttl ?</div><div style="font-family: 'Courier New', courier, monaco, monospace, sans-serif; font-size: 10pt; "><br></div><div style="font-family: 'Courier New', courier, monaco, monospace, sans-serif; font-size: 10pt; ">example:</div><div style="font-family: 'Courier New', courier, monaco, monospace, sans-serif; font-size: 10pt; ">application :</div><div style="font-family: 'Courier New', courier, monaco, monospace, sans-serif; font-size: 10pt;
"><br></div><div style="font-family: 'Courier New', courier, monaco, monospace, sans-serif; font-size: 10pt; ">PHP</div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2">$this->response->headers(array('Content-Type' => 'text/html', 'esi-enabled' => 'true | 20m'));</font><br></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"><br></font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2">VARNISH</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"><div>if (beresp.http.esi-enabled ~ "true | [0-9a-z]+$") {</div><div> set beresp.ttl = regsub(beresp.http.esi-enabled,"([0-9a-z]+$)","\0");</div><div> unset beresp.http.esi-enabled;</div><div>}</div><div><br></div><div>after varnish restart i get:</div><div><div>Stopping HTTP accelerator: varnishd
failed!</div><div>Starting HTTP accelerator: varnishd failed!</div><div>Message from VCC-compiler:</div><div>Expression has type STRING, expected DURATION</div><div><br></div><div>Regards</div></div></font></div></div></body></html>