var reg=/[\(\d{3}\)]/g;
(reg).test(str); // 
the above code is true for any number of parenthesis str="(((555)))", str="((555))".
I want true only when there is only one pair of parenthesis str="(555)" and for any other string it should be false;
 
    