I have the following:
if($(\"div[id*=\'*test-*-0-value\']\").length > 0){ // do stuff }
Unfortunatly the wild card *test-*-0-v
*test-*-0-v
use james padolsey jquery's regex selector , and apply it to your example like :
if($("div:regex(id, *test-*-0-value").length > 0) { }