Wie bekomme ich den Teil der regex-match-variable in python?

In Perl ist es möglich, so etwas zu tun (ich hoffe die syntax richtig ist...):

$string =~ m/lalala(I want this part)lalala/;
$whatIWant = $1;

Möchte ich das gleiche tun in Python und bekommen den text innerhalb der Klammern in einem string wie $1.

InformationsquelleAutor Lucas | 2009-11-26

Schreibe einen Kommentar