Skip to content

Instantly share code, notes, and snippets.

@geta6
Last active December 29, 2015 23:59
Show Gist options
  • Save geta6/7746054 to your computer and use it in GitHub Desktop.
Save geta6/7746054 to your computer and use it in GitHub Desktop.
#!/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'
#!/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