Howto parse a string using a char in python

Steve Goodwin sgoodwin at cfl.rr.com
Sat Feb 16 00:04:43 CET 2013


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 function required?

Thank you.

- Spoog98 





More information about the Python-list mailing list