title: Getting real names out of names that may or may not have a clan tag prefix
body: <p><strong>GOOGLE SCRIPT not just normal javascript.</strong></p>
  <p>I am trying to put together a google sheets to show the rankings for an online videogame, <a href="http://sauerbraten.org/" rel="nofollow noreferrer">Cube 2, Sauerbraten</a>. I already have a way to get a list of players on the server at any given moment. However since people join and leave clans all the time, it would be very disappointing if when one leaves and/or joins a new clan, he has to start over in the rankings. So I quickly came up with the below code in hopes to scan a player's name, and if there is a clan tag at the beginning of his name, it gets rid of it. clansPre is an array of some of the clan tags. The idea is that if va|P1, RED|P2, .rC|P3, !s]P4, [RUSS]P5, Crowd&gt;P6, oo|P7, and P08 played a game together, their stats would be recorded under P1, P2, P3, P4, P5, P6, P7, and P08. However, the limited testing I've been able to do has shown that it always removes the first 3 characters, regardless of name. Also, cName was my attempt to get name in string form, back when I was trying to use startWith().</p>
  <pre><code>var clansPre = [&quot;va|&quot;, &quot;RED|&quot;, &quot;.rC|&quot;, &quot;!s]&quot;, &quot;vaQ'&quot;, &quot;[RUSS]&quot;, &quot;cm|&quot;, &quot;Crowd&gt;&quot;, &quot;oo|&quot;];
  var numClans = clansPre.length;
  function nameWoClan(name){
    var cName = name.substring(0, name.length)
    for(var cC = 0; cC&lt;numClans; cC++) {
      if(cName.search(clansPre[cC]) == 0) {
        return cName.substring(clansPre[cC].length, name.length)
      }
    }
    return cName;
  }
  </code></pre>
  <p>It might be that I'm completely stupid, but in defence, the only programming language I learned that I didn't teach myself was Java, which was last year, and I haven't really needed to use Java since then, so I'm a little rusty. Anyway, thank you!</p>