Does anyone know of a quick way of performing this:

$testVar =~ s#/mail/.*$##g

The only way I can think of doing it, is:

mailPos = testVar.find( "mail" )
remainder =  testVar[ :mailPos ]

Any ideas would be appreciated.  I'm iterating over a lot of entries, 
and running these lines for each entry.

J


-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to