Regular Expression question

Michelle McCall michelle.mccall at argonst.com
Thu Dec 1 18:53:34 CET 2005


I have a script that needs to scan every line of a file for numerous
strings.  There are groups of strings for each "area" of data we are looking
for.  Looping through each of these list of strings separately for each line
has slowed execution to a crawl.  Can I create ONE regular expression from a
group of strings such that when I perform a search on a line from the file
with this RE it will search the line for each one of the strings in the RE ?

Michelle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: winmail.dat
Type: application/ms-tnef
Size: 1772 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-list/attachments/20051201/cfd2b1fc/attachment.bin>


More information about the Python-list mailing list