[英]Emacs regex search for lines with less then 20 characters
因此,如果我们有一些具有可变行长的txt文件,那么如何使用emacs正则表达式行来搜索少一些字符(比如说20个)的字符。
This should do the job it matches any line with between 0 and 20 tokens on it 这应该可以完成匹配标记在0到20之间的任何行的工作
^[^\\n]{0,20}$
^
Start of a line (or String) ^
开头(或字符串)
[^\\n]
Anything that is not a new line [^\\n]
任何不是换行的内容
{0,20}
The previous between 0 and 20 times {0,20}
前一个0到20次之间
$
End of line (or String) $
行尾(或字符串)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.