I am trying to write regular expression for the below string
"+1(332)313-1231"
this is my regular expression
var regex=new RegExp('^+1([1-9]{3})+[1-9]{3}+-[1-9]{4}')
how can I correct the regular expression inorder to test the string with above format?