2009/2/23 CherryMM <[email protected]>: > 我在linux终端用命令" grep -E '^[[:space:]]*[\*|_]*\b.*?=' ./test.cpp" 能输出匹配的信 > 息, 但我把这个命令移到perl代码里就不匹配了,在perl里引用命令的代码:` grep -E '^[[:space:]]*[\*|_]* > \b.*?=' ./test.cpp` > 请问一下这是怎么回事,谢谢?
直接用 Perl 的 regexp 过滤吧,不要再启动个 grep(1) 了。 lee --~--~---------~--~----~------------~-------~--~----~ 您收到此信息是由于您订阅了 Google 论坛“PerlChina Mongers 讨论组”论坛。 要在此论坛发帖,请发电子邮件到 [email protected] 要退订此论坛,请发邮件至 [email protected] 更多选项,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问该论坛 -~----------~----~----~----~------~----~------~--~---
