Newbie backreference question

paulm paulm at barley.vel.net
Thu Jun 30 23:12:56 CEST 2005


Hi,
	In perl I can do something like:

$a = 'test string';
$a =~ /test (\w+)/;
$b = $1;
print $b . "\n";

and my output would be "string".

	How might this snippet be written in python?

Thanks to all...



More information about the Python-list mailing list