regular expression question: last occurence
Oleg Broytmann
phd at emerald.netskate.ru
Sat Jun 12 12:12:33 EDT 1999
On Sat, 12 Jun 1999, Gerrit Holl wrote:
> currentdir = os.getcwd()
> mo = re.search('/linuxgames', currentdir)
> eind = mo.end()
> subdir = currentdir[eind:] + '/'
>
> But that doesn't solve my problem.
print os.path.basename(currentdir)
> kind regards,
> Gerrit.
>
> --
> The Dutch Linuxgames website. De Nederlandse Linuxgames pagina.
> Everything about games on Linux. Alles over spelletjes onder Linux.
> Site address: http://linuxgames.nl.linux.org
> Personal homepage: http://nl.linux.org/~gerrit/
Oleg.
----
Oleg Broytmann Netskate/Inter.Net.Ru phd at emerald.netskate.ru
Programmers don't die, they just GOSUB without RETURN.
More information about the Python-list
mailing list