相关疑难解决方法(0)

在RegEx中将空格转换为制表符

你怎么说正则表达式中的以下内容:

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个选项卡

任何帮助,将不胜感激.

regex string

5
推荐指数
1
解决办法
6027
查看次数

标签 统计

regex ×1

string ×1