title: How to split a language string (Wordpress qTranslate) in javascript
body: <p>I've got this javascript string:</p>
  
  <pre><code>"&lt;!--:fr--&gt;Photos&lt;!--:--&gt;&lt;!--:en--&gt;Pictures&lt;!--:--&gt;"
  </code></pre>
  
  <p>And I need to parse it to get every "language" in distinct strings. The ideal would be to have a function like:</p>
  
  <pre><code>function getText(text, lang){
      // get and return the string of the language "lang" inside the multilang string "text"
  }
  </code></pre>
  
  <p>That I can call like that:</p>
  
  <pre><code>var frenchText = getText("&lt;!--:fr--&gt;Photos&lt;!--:--&gt;&lt;!--:en--&gt;Pictures&lt;!--:--&gt;","fr");
  // and would return:
  // frenchText = Photos
  </code></pre>
  
  <p>If anyone know a good way to do that, probably with a regexp that would be FANTASTIC!!!</p>