lundi 6 avril 2015

Does node.js has 'match()' method? If so what is the syntax?

I tried using .match() method in node.js and the console returns has no method 'match'. This is the part where I call the method:



fs.readFile('proxy.txt', function (err, data) {
if (data.match('\n').length < proxyNum) {
proxyNum = data.match('\n').length;
}
console.log('Testing ' + proxyNum + 'proxies.');
});


Any idea how I could properly call .match()?


Aucun commentaire:

Enregistrer un commentaire