title: Split string on non alphanumeric characters using awk
body: <p>I'm trying to get the last substring before a non alphanumeric character. For eg.</p>
  
  <p>1) beta gamma foo</p>
  
  <p>2) beta gamma%foo</p>
  
  <p>3) beta gamma|---foo</p>
  
  <p>In all of the above examples I'm trying to get "foo" as it is the last substring after splitting on non-alphanumeric characters</p>
  
  <p>So far I've tried</p>
  
  <pre><code>cat file* | awk -F'[^:alnum:]' '{print $NF;}' | less
  </code></pre>
  
  <p>but this doesn't give the expected results</p>