Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #16355
| References | <9707115.134.1322511872642.JavaMail.geo-discussion-forums@yqeu24> <4ED3F303.8020307@stoneleaf.us> |
|---|---|
| Date | 2011-11-28 21:08 +0000 |
| Subject | Re: remove characters before last occurance of "." |
| From | Arnaud Delobelle <arnodel@gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.3108.1322514511.27778.python-list@python.org> (permalink) |
On 28 November 2011 20:45, Ethan Furman <ethan@stoneleaf.us> wrote:
> plsullivan1@gmail.com wrote:
>>
>> s = GIS.GIS.Cadastral\GIS.GIS.Citylimit
>> NeededValue = Citylimit
>
> NeededValue = s.rsplit('.', 1)[1]
Also:
>>> s[s.rfind(".") + 1:]
'Citylimit'
>>> s.rpartition(".")[2]
'Citylimit'
--
Arnaud
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
remove characters before last occurance of "." plsullivan1@gmail.com - 2011-11-28 12:24 -0800
Re: remove characters before last occurance of "." Ethan Furman <ethan@stoneleaf.us> - 2011-11-28 12:45 -0800
Re: remove characters before last occurance of "." Arnaud Delobelle <arnodel@gmail.com> - 2011-11-28 21:08 +0000
Re: remove characters before last occurance of "." plsullivan1@gmail.com - 2011-11-28 13:13 -0800
Re: remove characters before last occurance of "." plsullivan1@gmail.com - 2011-11-28 13:13 -0800
csiph-web