Hi,
I'm reading text from a file (per line) and I want to do a regex using these lines but I want the regex to ignore any special characters and treat them like normal strings.
Is there a regex function that can do this?
Here is what I have so far:
fp = open('file.txt','r')
notes = fp.readlines()
fp.close()
strin = "this is what I want"
for note in notes:
    if re.search(r""+ str(note) + "",strin):
          print "Found " + str(note) + " in " + strin

Thanks for any help
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to