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.
我正在尝试编写一个简单的 grep 脚本,它将在文档中搜索不包含空格或制表符的行,但我遇到了困难。我不希望它使用 grep 的选项我只想用类本身来做,但我不确定如何做到这一点。
我最后一次失败的尝试是 grep '[^[:blank:]*]
你想要 /^[^[:blank:]]*$/
用这个来测试:http ://rubular.com/
尝试将“^[^[:blank:]]*$”放在“你的正则表达式:”下
并开始在下面的文本区域中输入。
这是一个例子:http ://rubular.com/r/WfiXhl3jPV