title: jQuery - split string by symbol and get last part
body: <p>If I have a list of bank account numbers such as the following :</p>
  
  <pre><code>&lt;span&gt;6456465465/0471&lt;/span&gt;
  &lt;span&gt;4547/6456465465/0471&lt;/span&gt;
  &lt;span&gt;4547/6465465/0471&lt;/span&gt;
  </code></pre>
  
  <p>How can I get the last four digits from each of these? Some bank accounts have a prefix, some don't.</p>
  
  <p>My code works only with first span, because rest of account have prefix.</p>
  
  <pre><code>$("span").each(function(){
    var kodBanky = $(this).text().split("/")[1];      
    $('body').append("&lt;p&gt;" + kodBanky + "&lt;/p&gt;");    
  });
  </code></pre>
  
  <p><a href="http://codepen.io/anon/pen/GqpPdO?editors=1010" rel="nofollow">Codepen</a></p>