Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python
"""
contactinfo.py is a simple script to get contact information from
Facebook.
To use, first install mechanize [1]. Then use the friendstocsv application [2]
on Facebook to export a csv file with all of your friends. Be sure
to include at least the profile URL.
Afterwards, edit this file to put your email, password, and user agent
#!/usr/bin/perl
use strict;
use warnings;
my $x = [qr/([aieou]+)/io, qr/(\d+)/o]; #<- Here is a list of 2 regexes...
my $line = <STDIN>;
foreach my $regex (@{$x}) {
if ($line =~ $regex) {
print "a vowel or digit!\n";
from typedispatch import *
@dispatch(regexmulti(r'(\d{3})\D{0,2}(\d{3})\D?(\d{4})'))
def phone_numbers(phone_numbers):
for match in phone_numbers:
print '-'.join(match.groups())
@dispatch()
def phone_numbers(text):
We couldn’t find that file to show.