php 正则问题

字符串形如:
PHP code

1.xxxxxxinclude('path');xxxxx
2.xxxxxinclude 'path';xxxxx
3.xxxxxinclude  "path";xxxx


我想用一个正则提取出上面3种情况下的 path 参数
请问正则需要怎么写 谢谢!

作者: hu5210898   发布时间: 2011-06-06

PHP code

//纯手写。没检验的
preg_match_all('/include\s*[\(][\'"](.)*[\'"][\)]??/i', $string, $matches);

print_r($matches);

作者: yangball   发布时间: 2011-06-06