Fixed regex for #3144 

see comments in https://github.com/yiisoft/yii/commit/c1d781ad2383d72821b8375bbcd1a19ab59a6156