2 Oct 2011 10:36
matching strings in python
dudes dudes <akam123 <at> hotmail.co.uk>
2011-10-02 08:36:08 GMT
2011-10-02 08:36:08 GMT
Hello,
Can someone kindly point me my mistake here in this code. I'm trying to search a file for 10000 OR 10001 (in python).
import re;
this= open("file", r)
for line in this:
if re.match('(10000)' | '(10001)', line)
print line
/*It doesn't give me any errors. However; doesn't find the 10000 OR 10001 */
thanks for your time
ak
Can someone kindly point me my mistake here in this code. I'm trying to search a file for 10000 OR 10001 (in python).
import re;
this= open("file", r)
for line in this:
if re.match('(10000)' | '(10001)', line)
print line
/*It doesn't give me any errors. However; doesn't find the 10000 OR 10001 */
thanks for your time
ak
-- Gllug mailing list - Gllug <at> gllug.org.uk http://lists.gllug.org.uk/mailman/listinfo/gllug

RSS Feed