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.
たとえば、次を含むすべての行をフィルタリングするためにPerlで正規表現を使用する最良の方法は何/usr/libexec/postfixですか?
/usr/libexec/postfix
それはまたキャッチするでしょう、例えば:/usr/libexec/postfix/qmgr、、など?/usr/libexec/postfix/smtp/usr/libexec/postfix/local
/usr/libexec/postfix/qmgr
/usr/libexec/postfix/smtp
/usr/libexec/postfix/local
これはうまくいくはずです:
if ($line =~ m{^/usr/libexec/postfix.*}) { print "Match!\n"; } else { print "No match\n"; }
作業例: http://codepad.org/jkVlISdv