regular expression: perl ==> python

JZ wnebfynj at mnovryyb.pbz
Wed Dec 22 17:12:55 CET 2004

Dnia Wed, 22 Dec 2004 16:55:55 +0100, Fredrik Lundh napisał(a):

> the "_" symbol has no special meaning when you run a Python program, 

That's right. So the final code will be:

import re
line = "The food is under the bar in the barn."
found ='foo(.*)bar',line)
if found:  print 'got %s\n' %

JZ ICQ:6712522  

More information about the Python-list mailing list