Perl has some good and easy function to set the returned value to a variable
if($string =~ /<(\w+)>/){
$name = $1;
}
This is what I tried for python and it works, but is there any alternative way of doing this?
if re.match('\s*<\w+>.+', string):
var = re.findall('>(\w+)<', string)
.group(0)to the end of thevarline