Python 2.7 比较python中给定行中的一组字符串

Python 2.7 比较python中给定行中的一组字符串,python-2.7,Python 2.7,如何检查字符串 "1-1374729743 -H 192.168.26.15 -p movik123 executed status:(success)" 存在于 "DBG:1:(0){07/25/13 - 01:29:23:011145}:ExportFWWorkerThread.cpp:156:handleExport VERTICA: cmd - /opt/daf/bin/vertica-export.py -f "*t1*,*t1.mon,*t2*,*t2.mon" -s /data/

如何检查字符串

"1-1374729743 -H 192.168.26.15 -p movik123 executed status:(success)"
存在于

"DBG:1:(0){07/25/13 - 01:29:23:011145}:ExportFWWorkerThread.cpp:156:handleExport VERTICA: cmd - /opt/daf/bin/vertica-export.py -f "*t1*,*t1.mon,*t2*,*t2.mon" -s /data/Dellraid6-ppe/export/1-1374729743 -H 192.168.26.15 -p movik123 executed status:(success) updated bitmask:(0)"

使用python时,显然您使用的是类unix系统,如果您是python新手,grep可以作为python的替代品:-

grep PATTERN [FILE...]

1.你能展示你的代码吗?2.你能整理一下你的问题吗?