当我尝试这个时:
'cable/agency'.replace(/\//, '\/');
我明白了:
'cable/agency'
如果我试试这个:
'cable/agency'.replace(/\//, '\\/');
或者这个:
'cable/agency'.replace(/\//, '\\\/');
我明白了:
processedString cable\/agency
FilterTypes.js:51 processedString cable\\/agency
FilterTypes.js:51 processedString cable\\\/agency
FilterTypes.js:51 processedString cable\\\\/agency
FilterTypes.js:51 processedString cable\\\\\/agency
FilterTypes.js:51 processedString cable\\\\\\/agency
等,直到超过调用堆栈。