Regular Expression question

Michelle McCall michelle.mccall at
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 ?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: winmail.dat
Type: application/ms-tnef
Size: 1772 bytes
Desc: not available
URL: <>

More information about the Python-list mailing list