Wildcard for string replacement?!?!

Perverted Orc perverted_orc at softhome.net
Mon Mar 10 20:13:32 CET 2003

Hello everyone!
I 'm working for over a week on this script but I can't make my way out. The
whole idea is to replace (better say delete) anything that stands between
the <td> and</td> tag of an html file.

from string import *
pname=raw_input("Give path\ :") #The path name where the original file is
and the new to be saved
fnameo=raw_input("Give file to change :")
fnamen=raw_input("...Save As :")
old_file=pname+fnameo #Joining path and file name
new_file=pname+fnamen #Joining path and file name
inp=open (old_file,'r')
for line in inp.readlines():
     nline=replace(line,"?????"," ")
print "1 file changed and saved..."
Can anyone tell me what to fill in the ????? area? I tried any possible
combination with "." and "*" but didn't work.
Please help!!!

More information about the Python-list mailing list