如何匹配 procmail 中邮件正文中的任何空格?
我尝试使用这样的规则:
:0 B
* Something[[:space:]]+whatever
但它不起作用。
当我将 [[:space:]] 更改为文字空格字符时:
:0 B
* Something +whatever
它有效。
它也适用于以下情况:
:0 B
* Something[ ]+whatever
我一定做错了什么,但无法真正找到它。有什么提示吗?
I tried to use such rule:
:0 B
* Something[[:space:]]+whatever
but it doesn't work.
When I change [[:space:]] to literal space character:
:0 B
* Something +whatever
it works.
It also works in case of:
:0 B
* Something[ ]+whatever
I must be doing something wrong, but can't really find it. Any hints?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
只在要匹配的类中添加空白字符怎么样:
匹配空格、制表符、回车符和换行符。
当然还有更多的空白字符,但这些是最常用的。
What about just adding the white space characters in a class you want to match:
matches a space, tab, carriage return and line feed.
There are of course more white space chars, but these are the most commonly used.