Validate US Telephone Numbers Problem

Would someone please tell me what I’m doing incorrectly?

function telephoneCheck(str) {
  // Good luck!
  var re = /[1]?\s?[(]?\d{3}[)]?[- ]?\d{3}[- ]?\d{4}/g;
  
  
  console.log(str.search(re)!==-1);
  
  
  if(str.search(re)!==-1){
    return true;
    
  }else{
    return false;
    
  }

}



telephoneCheck("555-555-5555");

It’s giving some false positives, particularly when it comes to mismatching parentheses.

[(]?\d{3}[)]? <-- allows for either open or closed parens, but doesn't enforce both

I tried to wrap the whole thing in parenthesis, but that didn’t work. Any hints on how to do that?

I’m still having some trouble with this one. Could someone help?

function telephoneCheck(str) {
  // Good luck!
  var re = /^[1]?\s?[[(]\d{3}[)]|\d{3}][-\s]\d{3}[-\s]\d{4}$/g;
  
  
  console.log(str.search(re)!==-1);
  
  
  if(str.search(re)!==-1){
    return true;
    
  }else{
    return false;
    
  }
}

telephoneCheck("555-555-5555");

Still having some problems with this. Any suggestions?