I tried Bernus' solution and it worked for me. From a previous thread I have seen that this was supposed to be fixed in the last version but it appears that (almost) the same error has crept back in for the very latest vers 1.3.4.2
Go to plugins/wordpress-seo/admin/class-metabox.php.
On line 1435 add a forward-slash as below:
old line : if ( preg_match( '/alt=("|\')(.*?)\1|', $img, $alt ) )
new line : if ( preg_match( '/alt=("|\')(.*?)\1/', $img, $alt ) )