[BUG #7292] fix for sphinx <= v1.0.8
[BUG #7292] refine regex