title: Any JavaScript parser for .lrc?
body: <p>I was using the code from <a href="http://hikejun.com/blog/2006/09/17/javascriptparsing-lrc-lyric/" rel="nofollow">Kejun's Blog</a> . </p>
  
  <p>I want to parse a .lrc (which is basically a lyrics file) so as to get the time variable as well as the string(read lyrics) . I tried out this code and could not seem to get the output .</p>
  
  <pre><code>   &lt;html&gt;
  &lt;head&gt; 
  &lt;script src="jquery-1.7.1.js"&gt;&lt;/script&gt;
  &lt;script&gt; 
  $(document).ready(function () {
      $.ajax({
          type: "GET",
          url: "a.txt",
          dataType: "text",
          success: function (data) {
              parseLyric(data);
          }
      });
  });
  
  var _current_lyric = new Array();
  
  function convertLRCLyric(inf) {
      inf += "n";
      var lyric = inf.match(/([(d{2}:d{2}(.d{1,2}){0,1})]){1,}W*n|([(d{2}:d{2}:d{2}(.d{1,2}){0,1})]){1,}W*n/ig);
      var l_s = '',
          l_tt, l_ww, l_i, l_ii;
      if (!lyric || !lyric.length) {
          return;
      }
  
      for (l_i = 0; l_i &lt; lyric.length; l_i++) {
          l_tt = lyric[l_i].match(/([d{2}:d{2}(.d{1,2}){0,1}])|([d{2}:d{2}:d{2}(.d{1,2}){0,1}])/ig);
          l_ww = lyric[l_i].replace(/[S+]/ig, '').replace(/n{1,}/ig, '');
          for (l_ii = 0; l_ii &lt; l_tt.length; l_ii++) {
              l_tt[l_ii] = l_tt[l_ii].replace(/[/,'').replace(/]/, '');
              if (l_tt[l_ii].search(/d{2}:d{2}:d{2}.d{2}/g) &gt;= 0) {
                  _current_lyric[l_tt[l_ii].substring(0, l_tt[l_ii].length - 1)] = l_ww;
              } else if (l_tt[l_ii].search(/d{2}:d{2}:d{2}.d{1}/g) &gt;= 0) {
                  _current_lyric[l_tt[l_ii]] = l_ww;
              } else if (l_tt[l_ii].search(/d{2}:d{2}:d{2}/g) &gt;= 0) {
                  _current_lyric[l_tt[l_ii] + ".0"] = l_ww;
              } else if (l_tt[l_ii].search(/d{2}:d{2}.d{2}/g) &gt;= 0) {
                  _current_lyric["00:" + l_tt[l_ii].substring(0, l_tt[l_ii].length - 1)] = l_ww;
              } else if (l_tt[l_ii].search(/d{2}:d{2}.d{1}/g) &gt;= 0) {
                  _current_lyric["00:" + l_tt[l_ii]] = l_ww;
              } else if (l_tt[l_ii].search(/d{2}:d{2}/g) &gt;= 0) {
                  _current_lyric["00:" + l_tt[l_ii] + ".0"] = l_ww;
              }
          }
      }
  }
  
  function parseLyric(allText) {
      _current_lyric = [];
      convertLRCLyric(allText);
      var ly = "";
      for (var time in _current_lyric) {
          ly += time + "--" + _current_lyric[time] + "n";
      }
      alert(ly);
  }
  &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>But i keep getting a blank alert . Any help would be great . Thanks in advance .</p>