Skip to content

Instantly share code, notes, and snippets.

@geta6
Created January 27, 2014 04:11
Show Gist options
  • Save geta6/8643150 to your computer and use it in GitHub Desktop.
Save geta6/8643150 to your computer and use it in GitHub Desktop.
#!/usr/bin/env perl
use strict;
use warnings;
use LWP::UserAgent;
my $ua = LWP::UserAgent->new;
my $req = HTTP::Request->new(GET => 'http://www.keio.ac.jp/ja/contact/sfc.html');
my $res = $ua->simple_request($req);
my $cnv = $res->content;
$cnv =~ s/0\d{1,5}[-(]\d{1,4}[-)]\d{4}/(telephone number)/g;
open(FH, '> ./sfc.html');
print FH $cnv;
close(FH);
print "done\n";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment