title: emacs using sort-regexp-fields to sort lines
body: <p>How could I use the <code>sort-regexp-fields</code> to emulate the sort-numeric-fields. I tried like this:</p>
  
  <pre><code>123
  345
  90
  80
  1999
  </code></pre>
  
  <p><code>M-x</code> <code>sort-regexp-fields</code></p>
  
  <p><code>Regexp specifying records to sort:</code> \ ([0-9]+\)</p>
  
  <p><code>Regexp specifying key within record:</code> \, \#1</p>
  
  <p>But it can’t work.
  what I really want to sort is something like this:</p>
  
  <pre><code>foo index: 123
  index: 345 boo
  …
  </code></pre>
  
  <p>the question is: I want to sort the lines by the number after the word “index”, but the number is not in the same field, they just have a word “index” before it. what should I do to complete this? anybody can help me?</p>