Re: Howto parse a string using a char in python

2013-02-15 Thread Gary Chambers
Steve, > I am looking for the python2.7 function(s) to parse a string from a colon > character ":" > > Sounds simple enough. > > For example, a string like "123456:789". I just need the "123456" > substring.(left of the :) How about: newstr = str[:str.find(':')] -- GC smime.p7s Descriptio

Re: Howto parse a string using a char in python

2013-02-15 Thread Mark Lawrence
On 15/02/2013 23:04, Steve Goodwin wrote: Hi, I am looking for the python2.7 function(s) to parse a string from a colon character ":" Sounds simple enough. For example, a string like "123456:789". I just need the "123456" substring.(left of the :) I have looked at regular expressions and str

Re: Howto parse a string using a char in python

2013-02-15 Thread John Gordon
In <511ebf0c$0$21334$9a6e1...@unlimited.newshosting.com> "Steve Goodwin" writes: > I am looking for the python2.7 function(s) to parse a string from a colon > character ":" > Sounds simple enough. > For example, a string like "123456:789". I just need the "123456" > substring.(left of the :

Re: Howto parse a string using a char in python

2013-02-15 Thread David Robinow
On Fri, Feb 15, 2013 at 6:04 PM, Steve Goodwin wrote: > Hi, > > I am looking for the python2.7 function(s) to parse a string from a colon > character ":" > > Sounds simple enough. > > For example, a string like "123456:789". I just need the "123456" > substring.(left of the :) "123456:789".split(

Re: Howto parse a string using a char in python

2013-02-15 Thread Tim Chase
On 2013-02-15 18:04, Steve Goodwin wrote: > Hi, > > I am looking for the python2.7 function(s) to parse a string from a > colon character ":" > > Sounds simple enough. > > For example, a string like "123456:789". I just need the "123456" > substring.(left of the :) > > I have looked at regula

Howto parse a string using a char in python

2013-02-15 Thread Steve Goodwin
Hi, I am looking for the python2.7 function(s) to parse a string from a colon character ":" Sounds simple enough. For example, a string like "123456:789". I just need the "123456" substring.(left of the :) I have looked at regular expressions and string functions, so far no luck. Custom fun