我在 javascript 中使用这个正则表达式:
search.split(/\s+/g);
但是,我发现它给了我
input output
`car` ["car"]
`car ` ["car",""]
` car` ["","car"]
` car ` ["","car",""]
` car is ` ["","car","is",""]
如何更改正则表达式以使我不会领先或落后""
?