Last active
December 29, 2015 23:59
-
-
Save geta6/7746054 to your computer and use it in GitHub Desktop.
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
#!/usr/bin/env coffee | |
fs = require 'fs' | |
http = require 'http' | |
{exec} = require 'child_process' | |
http.get 'http://www.keio.ac.jp/ja/contact/sfc.html', (res) -> | |
data = '' | |
res.on 'data', (chunk) -> | |
data += chunk | |
res.on 'end', -> | |
fs.writeFile './sfc.html', data.replace /0\d{1,5}[-(]\d{1,4}[-)]\d{4}/g, 'telephone number' | |
exec 'open sfc.html' |
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
#!/usr/bin/env coffee | |
fs = require 'fs' | |
http = require 'http' | |
{exec} = require 'child_process' | |
http.get 'http://www.keio.ac.jp/ja/contact/sfc.html', (res) -> | |
data = '' | |
res.on 'readable', -> | |
data += res.read() | |
res.on 'end', -> | |
fs.writeFile './sfc.html', data.replace /0\d{1,5}[-(]\d{1,4}[-)]\d{4}/g, 'telephone number' | |
exec 'open sfc.html' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment