Use preg_match instead of strpos

Fixing issue:
https://github.com/phpbrew/phpbrew/issues/375#issuecomment-61983072