<p>Wanted to convert</p>

<pre><code>&lt;br/&gt;
&lt;br/&gt;
&lt;br/&gt;
&lt;br/&gt;
&lt;br/&gt;
</code></pre>

<p>into</p>

<pre><code>&lt;br/&gt;
</code></pre>

Use a regular expression to match
```
<br/>
```
one or more times, then use preg_replace (or similar) to replace with
```
<br/>
```
such as levik's reply.