I use this class PHP (<a href="http://varnish-cache.org/wiki/CLI">http://varnish-cache.org/wiki/CLI</a>) to clean the Varnish cache, I only do this:
<div><br></div><div><div>$var01Obj = new Varnish('192.168.11.41', 6082, 3);</div><div>$var01Obj->set_auth('XXXXXXXXXXXX' . "\n");</div><div>$ret = $var01Obj->connect();</div><div>if ($ret['status']) {</div>

<div><span class="Apple-tab-span" style="white-space:pre">      </span>print_r($var01Obj->purge_url($url));</div><div>} else {</div><div><span class="Apple-tab-span" style="white-space:pre">       </span>print_r($ret);</div><div>

}</div></div><div><br></div><div>where $url is an url of the form ^/news/$ but I have a problem and I need to delete all the cache of a site, let say, I have <a href="http://www.site.com/news/">www.site.com/news/</a> and the news are <a href="http://www.site.com/news/1/title/">www.site.com/news/1/title/</a> and I have 5,000 news, but also I have other site <a href="http://www.other-site.com">www.other-site.com</a> with the same friendly urls, so I only need to clean the cache for <a href="http://www.site.com">www.site.com</a> not for <a href="http://www.other-site.com">www.other-site.com</a>. If I make</div>

<div><br></div><div>$url = '^www.site.com.*&'; </div><div><br></div><div>will it work?</div><div><br></div><div>I know ^/news.*$ works since I have some rules like that (for comments for example), but I have no idea if it will work using the full domain</div>