<commit_before>
koc = {};

koc.test = function() {
	return "hellow, world";
};

module.exports = koc;<commit_msg>added parseBattlefield<commit_after>
var koc = {};

koc.parseBattlefield = function(html) {
    var re = /<tr class="player" user_id="([0-9]+)"\s*>\s*<td[^>]*><a href="alliances\.php\?id=([^"]*)">[^<]*<\/a><\/td>\s*<td><a[^>]*>([^<]+)<\/a><\/td>[^>]*>([0-9,]+)<\/td>[^>]*>\s*([A-Za-z0-9-_]+)\s*<\/td>[^>]*>([^G]+)Gold<\/td>[^>]*>([^<]+)<\/td>/gmi;
    var players = [];
    var m;
    while ((m = re.exec(html)) !== null) {
        if (m.index === re.lastIndex) {
            re.lastIndex++;
        }
        // View your result using the m-variable.
        // eg m[0] etc.
        var player = {
          userid   : m[1],
          alliance : m[2],
          username : m[3],
          armySize : m[4],
          race     : m[5],
          gold     : m[6],
          rank     : m[7]
        };
        players.push(player);
    };
    return players;
};

module.exports = koc;
{'fraction_non_alphanumeric': 0.27492447129909364, 'fraction_numerical': 0.014098690835850957, 'mean_word_length': 2.0584615384615383, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 26, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6352731', 'n_tokens_mistral': 407, 'n_tokens_neox': 397, 'n_words': 62}