Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试匹配所有空格并转换为转义空格,但只有那些没有出现在行尾的空格,到目前为止,我已经尝试过/\ !$/\\\ /g在该点周围进行一般按钮混搭。
/\ !$/\\\ /g
使用这个正则表达式(?m)( +)(?!$)
(?m)( +)(?!$)
(?m)正则表达式选项multyLine
(?m)
( +)> 0 个空格
( +)
(?!$)不是行尾
(?!$)