Hi All,

     I am working on a script to use re.findall,

But the result seems wield.

--------------------------------------------------------------------

import re

p=re.compile("\S+",re.M)

pirfile="""

>DL;mm9|

>DL;petMar1|

>DL;cavPor3|

>DL;mm9|:

"""

for m in p.findall(pirfile,re.M):

        print m

Results:

|

>DL;petMar1|

>DL;cavPor3|

>DL;mm9|

The first result is missing some characters, Could you explain why? Any wrong with the script?

I tried Python2.4/2.6/2.7, the result is same.


Thank you.


Hongchao Lu