<p>You are given a phone number as a string <code>number</code>. <code>number</code> consists of digits, spaces <code>''</code>, and/or dashes <code>'-'</code>.</p>
<p>You would like to reformat the phone number in a certain manner. Firstly, <strong>remove</strong> all spaces and dashes. Then, <strong>group</strong> the digits from left to right into blocks of length 3 <strong>until</strong> there are 4 or fewer digits. The final digits are then grouped as follows:</p>
<ul>
<li>2 digits: A single block of length 2.</li>
<li>3 digits: A single block of length 3.</li>
<li>4 digits: Two blocks of length 2 each.</li>
</ul>
<p>The blocks are then joined by dashes. Notice that the reformatting process should <strong>never</strong> produce any blocks of length 1 and produce <strong>at most</strong> two blocks of length 2.</p>
<p>Return <em>the phone number after formatting.</em></p>