你怎么说正则表达式中的以下内容:
foreach line
look at the beginning of the string and convert every group of 3 spaces to a tab
Stop once a character other than a space is found
Run Code Online (Sandbox Code Playgroud)
这是我到目前为止:
/^ +/\t/g
Run Code Online (Sandbox Code Playgroud)
但是,这会将每个空间转换为1个选项卡
任何帮助,将不胜感激.