我试图通过参考How split a string in jquery with multiple strings as separator来基于多个分隔符拆分字符串
由于多个分隔符我决定遵循
var separators = [' ', '+', '-', '(', ')', '*', '/', ':', '?'];
var tokens = x.split(new RegExp(separators.join('|'), 'g'));
但我收到错误
Uncaught SyntaxError: Invalid regular expression: / |+|-|(|)|*|/|:|?/: Nothing to repeat
如何解决?