How to use python regular expression to substitute string value
Allerdyce.John at gmail.com
Allerdyce.John at gmail.com
Sun Feb 26 14:01:45 EST 2006
Thanks. But i don't understand why I need to do this:
x. . area = map (lambda x: int(x), re.findall (pattern, line)[0]
if i have the value already by doing this:
x, y, width, height, area = re.findall(pattern, line)[0]
print "rect x=\"%(x)s\" y=\"%(y)s\" width=\"%(width)s\"
height=\"%(height)s\" ..." % locals()
More information about the Python-list
mailing list