I use this simple check to tell if there's more than one dash:
if(s.indexOf("-") != s.lastIndexOf("-")){ ...}