PHP regex to replace words starting with @ end ending with 2 spaces : <p>In PHP, how do I strip all double spaces directly behind a word starting with an @ (at) symbol?</p>

<p>Example input:</p>

<pre><code>This is  an @example  input.
</code></pre>

<p>Example output:</p>

<pre><code>This is  an @example output.
</code></pre>
