简体   繁体   English

如何匹配procmail中邮件正文中的任何空格?

[英]How to match any whitespace in body of mail in procmail?

I tried to use such rule: 我试图使用这样的规则:

:0 B
* Something[[:space:]]+whatever

but it doesn't work. 但这不起作用。

When I change [[:space:]] to literal space character: 当我将[[:space:]]更改为文字空格字符时:

: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? 有什么提示吗?

What about just adding the white space characters in a class you want to match: 仅在要匹配的类中添加空格字符怎么办:

[ \t\r\n]

matches a space, tab, carriage return and line feed. 与空格,制表符,回车符和换行符匹配。

There are of course more white space chars, but these are the most commonly used. 当然,还有更多的空白字符,但是这些是最常用的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM