title: How can I split a two part padded string into two variables with Javascript?
body: <p>I have a string, <code>userName</code>, that looks something like this:</p>
  
  <pre><code>var userName = "CityOfLiverpool-----joesmith";
  var userName = "Hull----------------janesmith";
  </code></pre>
  
  <p>The first part of <code>userName</code> is the Account: <code>"CityOfLiverpool"</code></p>
  
  <p>The second part of <code>userName</code> is the User: <code>"joesmith"</code></p>
  
  <p>The Account is always a maximum of 20 characters and is padded to the right with hyphens. </p>
  
  <p>How can I extract the Account and the User?</p>