我有当前的正则表达式
(["']) \1|([-!$%^&*()_+|~=`{}\[\]:";'<>?,\w\/][ ]{2,})
我正在尝试匹配
var a = '', b = '';
something = '';
var something = 'something i dont know'
y = 'something' ,
1 = 2,
a = [
'something',
'a'
];
function some () {
console.log('someFunction');
}
function something () {
console.log('should allow multiple Spaces 1!');
console.log("should allow multiple Spaces 1!");
}
我想让它仅在不在引号内时匹配双(或更多)空格。
重要的是,它不会提示每行开头的空格(最好也不要在末尾)
最佳答案
关于javascript - 正则表达式不包含在引号中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24479157/