title: Return last [0-9]\{6\} from a string with sed
body: <p>I want to pass a long list of filenames in the form</p>
  
  <pre><code>something_0230232_long_5160mK.csv
  something_0230232_long-025160mK.csv
  simething_0230342_lingk425460mK.csv
  </code></pre>
  
  <p>to sed (or similar linux shell tools) and get always the 
  last array of digits before mK per line</p>
  
  <p>This works, if there are exactly 6 digits. how can I enhance it for n digits?</p>
  
  <pre><code>echo "something_0230232_long_025160mK.csv" | sed -e "s/S.*\([0-9]\{6\}\)mK\.csv/\1/p" 
  </code></pre>