Why it does NOT work on Linux ?

A printers at sendme.cz
Fri Feb 1 08:47:58 EST 2002


I have the following part of program that finds ItemID numbers.
Here, for example, are two
146759 and 146700 .
This program works well under windows but on Linux it does not 
find any number. Can you please help?
Thanks.
Ladislav

####################
import re
Text="""<tr BGCOLOR="#FFFFFF">
                      <td valign="top" align="left"><a 
href="lead.asp?ItemID=146759">[CN] Oak, Foiled & Antique 
Furniture</a></td>
                      <td valign="top" align="center">18/12/2001</td>
                    </tr><tr BGCOLOR="#FFFFFF">
                    <td valign="top" align="left"><a 
href="lead.asp?ItemID=146700">[CN] Oak, Foiled & Antique 
Furniture</a></td>
                      <td valign="top" align="center">18/12/2001</td>
                    </tr>"""

IDs=re.compile('.*<a href="lead.asp\?ItemID=(\d{5,10}).*')
Results=re.findall(IDs,Text)
print Results

##############
t




More information about the Python-list mailing list