I need to convert the following regex in Perl to Python
my $string = " <span class="name"><i class="genus">Corysanthes</i> <i class="species">grumula</i> <span class="authorship">D.L.Jones</span></span>"
I want to extract the value of genus (in this case, "Corysanthes") into a variable.
In Perl, I would write something like:
$string =~ /class=\"genus\">([^<]+)<\/i>/;
my $genus = $1;
How do you write this in Python?