You don't need to escape most symbolic characters in a reg exp alternatives group([...]);
var phonenum= string.replace(/[^0-9 ()+-]+/g, '');
Being in a character group, the range of 0-9 and each literal character is a match for the expression.
You would need to escape the short-cut characters, \s, \w, \d and so on
(and of course any entities that require the slash in a string (\r,\t,\n, etc)).
var phonenum= string.replace(/[^\d ()+-]+/g, '');[/B]
You do need to escape slashes, backslashes, and a right hand square bracket ']'.
An unescaped hyphen must be the first or last character in the group-
otherwise it will try to make a range of its neighbors.
On a side note, I like to replace any non-digits in a phone number that are not a '+' in the first position, with spaces.
var string= '+370 (555)-555-1000+303' ;
var phonenum= ' '+(string.match(/((^\+?)|(\d+))/g) || []).join(' ');
/* returned value: (String)
+ 370 555 555 1000 303
*/