<p>I'm using the following regex to capture a fixed width "description" field that is always 50 characters long:</p>

<pre><code>(?.{50})
</code></pre>

<p>My problem is that the descriptions sometimes contain a <em>lot</em> of whitespace, e.g.</p>

<pre><code>"FLUID        COMPRESSOR                          "
</code></pre>

<p>Can somebody provide a regex that:</p>

<ol>
<li>Trims all whitespace off the end</li>
<li>Collapses any whitespace in between words to a <strong>single space</strong></li>
</ol>

Is there a particular reason you are asking for a regular expression? They may not be the best tool for this task.
A replacement like
```
```
s/[ \t]+/ /g
```
```
should compress the internal whitespace (actually, it will compress leading and trailing whitespace too, but it doesn't sound like that is a problem.), and
```
```
s/[ \t]+$/$/
```
```
will take care of the trailing whitespace. [I'm using
```
sed
```
ish syntax here. You didn't say what flavor you prefer.]
Right off hand I don't see a way to do it in a single expression.