Mercurial > hg > Members > nobuyasu > test
changeset 15:b48915bffa79 draft default tip
commit search.py
author | Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Sun, 01 Jul 2012 00:31:22 +0900 |
parents | 19b1335632f6 |
children | |
files | scriptTest/search.py |
diffstat | 1 files changed, 1 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/scriptTest/search.py Sun Jul 01 00:23:51 2012 +0900 +++ b/scriptTest/search.py Sun Jul 01 00:31:22 2012 +0900 @@ -1,11 +1,7 @@ #!/usr/bin/python -import re - f = open('/home/student/e08/e085711/testProgram/wiki/enwiki20110526.txt', 'r') #f = open('./test.txt', 'r') for line in f: - if re.search('int', line) : print(line,end="") -# if re.match('int', line) : print(line,end="") - + if(line.find("int")+1) : print(line,end="")