pattern match !

Helmut Jarausch jarausch at
Wed Jul 11 13:29:40 CEST 2007

hari.siri74 at wrote:
> Extract the application name with version from an RPM string like
> hpsmh-, i require to extract hpsmh-
> from above string. Sometimes the RPM string may be hpsmh-
> Linux.RPM.

Have a try with

import re
PO= P.match(S)
if  PO :

Helmut Jarausch

Lehrstuhl fuer Numerische Mathematik
RWTH - Aachen University
D 52056 Aachen, Germany

More information about the Python-list mailing list