我使用xdebug在我的Wordpress debug.log中生成堆栈跟踪,它给我这些堆栈跟踪,如下所示:
[02-May-2014 16:35:14 UTC] PHP Stack trace:
[02-May-2014 16:35:14 UTC] PHP 1. {main}() /var/www/wp-admin/index.php:0
[02-May-2014 16:35:14 UTC] PHP 2. wp_dashboard() /var/www/wp-admin/index.php:125
[02-May-2014 16:35:14 UTC] PHP 3. do_meta_boxes() /var/www/wp-admin/includes/dashboard.php:149
[02-May-2014 16:35:14 UTC] PHP 4. call_user_func() /var/www/wp-admin/includes/template.php:924
[02-May-2014 16:35:14 UTC] PHP 5. wp_dashboard_site_activity() /var/www/wp-admin/includes/template.php:924
[02-May-2014 16:35:14 UTC] PHP 6. wp_dashboard_recent_posts() /var/www/wp-admin/includes/dashboard.php:538
[02-May-2014 16:35:14 UTC] PHP 7. WP_Query->__construct() /var/www/wp-admin/includes/dashboard.php:587
[02-May-2014 16:35:14 UTC] PHP 8. WP_Query->query() /var/www/wp-includes/query.php:3352
[02-May-2014 16:35:14 UTC] PHP 9. WP_Query->get_posts() /var/www/wp-includes/query.php:3246
[02-May-2014 16:35:14 UTC] PHP 10. apply_filters_ref_array() /var/www/wp-includes/query.php:3046
[02-May-2014 16:35:14 UTC] PHP 11. call_user_func_array() /var/www/wp-includes/plugin.php:256
[02-May-2014 16:35:14 UTC] PHP 12. ShareADraft->the_posts_intercept() /var/www/wp-includes/plugin.php:256
我可以在vim中匹配PHP Stack trace:
确定,但我需要一些方法来匹配匹配PHP <some space here> <some number>.
的所有行。我可以匹配该行,但我不知道匹配所有这些行的语法。
答案 0 :(得分:0)
尝试使用此选项匹配PHP <some space here> <some number>.
/\vPHP\s{-}\d+\.