Created
July 21, 2016 14:01
-
-
Save nodew/0f7821d44a97a471ea2f24a1ed053d8d to your computer and use it in GitHub Desktop.
count 'UCanUup' in the file 'http://106.75.28.160/UCloud.txt'
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var http = require('http'); | |
http.get('http://106.75.28.160/UCloud.txt', function(res) { | |
var body = ''; | |
res.on('data', function(d) { | |
body += d; | |
}); | |
res.on('end', function() { | |
var count = body.match(/UCanUup/g).length | |
console.log(count); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment