/^[\s()+-]*(\d[\s()+-]*){6,}$/
This doesn't count the 'cruft'. It allows any number of special characters, followed by six times [a digit followed by any number of special characters].
If you want max. one special character in between digits, use ?
instead of *
, but I assume you don't care much for more than one special character at the start or at the end, so I'd go with
/^[\s()+-]*(\d[\s()+-]?){6,}[\s()+-]*$/
This matches any number of special characters, followed by 6 or more times [a digit followed by at most one special character], followed by any number of special characters.
Another option would be to strip your special characters from the string first, and then match against 6 or more digits.
var rawInput = " 12 (3) -- 4 -5 ++6";
var strippedInput = rawInput.replace(/[\s()+-]*/g, "");
return new RegExp("^\d{6,}$").test(strippedInput);
Remember that you have a complete programming language at your disposal. I've noticed people tend to decide they need to use regex and then forget about everything else they can do.