regex - 删除正则表达式中的第一个空格

标签 regex notepad++

我是正则表达式的新手,所以我需要帮助如何在 notepad++ 的每一行中删除正则表达式中的第一个空格?

示例:
 191.341.411.314 80
 191.341.411.315 80
 191.341.411.316 80
 191.341.411.317 80

我需要这个
191.341.411.314 80
191.341.411.315 80
191.341.411.316 80
191.341.411.317 80

list include +1000 lines 什么是最好的解决方案??

最佳答案

您只需要 anchor你的正则表达式到字符串的开头

^\s

并且什么都没有替换。 \sshorthand character class空格

查看 here on Regexr

关于regex - 删除正则表达式中的第一个空格,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22829032/

相关文章:

Javascript 等效正则表达式

git - 如何从 Git Bash 在 Notepad++ 中打开文件?

notepad++ - 在 Notepad++ 中使用 Style Token 保存文件

regex - 如何在 git svn 中评估忽略路径?

javascript - 正则表达式在 chrome 控制台和 JSBin 中提供控制台输出

java - 删除所有不可打印字符的正则表达式

regex - 为什么在此正则表达式替换中丢失引号转义?

regex - Notepad++ 正则表达式

batch-file - 在 Notepad++ 中打开文本文件的批处理脚本

linux - 带有 Google Compute Engine 的 Notepad++ FTP 插件