title: Vim: sort using multiple patterns
body: <p>I know that, in vim, I can sort a file using a regular expression to indicate which parts of each row I want to use to consider while sorting using:</p>
  
  <pre><code>:sort 'regex' r
  </code></pre>
  
  <p>Is it possible to combine more than one expression?</p>
  
  <p>Here you have an example:</p>
  
  <p>INPUT:</p>
  
  <pre><code>bar a 2
  foo b 1
  bar b 1
  foo a 2
  </code></pre>
  
  <p>:sort '[a-z]' r</p>
  
  <pre><code>foo b 1
  bar b 1
  bar a 2
  foo a 2
  </code></pre>
  
  <p>sort '[0-9]' r</p>
  
  <pre><code>bar a 2
  bar b 1
  foo b 1
  foo a 2
  </code></pre>
  
  <p>EXPECTED (maybe something "like" :sort '[A-Z]|[0-9]' r ?):</p>
  
  <pre><code>bar b 1
  bar a 2
  foo b 1
  foo a 2
  </code></pre>
  
  <p>Please note that a bare "sort" does not work, due to those "a" and "b" which break the digits order</p>
  
  <pre><code>bar a 2
  bar b 1
  foo a 2
  foo b 1
  </code></pre>
  
  <p>An alternative outside VIM is also accepted, but, for sake of curiosity, I would like to know if it's actually possible to do it within VIM (and if afermative, how ;-)</p>
  
  <p>Many thanks,
  Regards</p>