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.
我需要从仅匹配webmin并Invalid login as root from使用 Perl 正则表达式的安全日志中过滤以下行:
webmin
Invalid login as root from
Apr 2 00:24:53 host webmin[98614]: Invalid login as root from 1.2.3.4
我试过这个,但它不匹配:
$line =~ /^\S+\s+\d+\s+\S+ \S+ webmin[\]: \Invalid login as root from/)
我在这里想念什么?
[
98614
\I
I
/^\S+\s+\d+\s+\S+ \S+ webmin\[\d+\]: Invalid login as root from/