Welcome to Etherpad!

This pad text is synchronized as you type, so that everyone viewing this page sees the same text. This allows you to collaborate seamlessly on documents!

Get involved with Etherpad at http://etherpad.org
import re

source = open("1984_en.txt", "r")
#source = open("joyce.txt", "r")
destination = open("perec.txt", "w")

regex = r'(\w*p+\w*e+\w*r+\w*e+\w*c+)'

destination.write("Source: George Orwell's 1984\n\n\n")
destination.write("Source: James Joyce, Almost complete works\n\n\n")

sentences = []
for line in source:
        words = line.split(" ")
        for word in words:
                if re.search(regex, word):
                        print(word)
                        destination.write(word+'\n')