Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Re: Howto parse a string using a char in python

Reply
Thread Tools

Re: Howto parse a string using a char in python

 
 
Mark Lawrence
Guest
Posts: n/a
 
      02-15-2013
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 string functions, so far no luck.
> Custom function required?
>
> Thank you.
>
> - Spoog98
>
>


More likely a visit to the opticians See
http://docs.python.org/2/library/std...string-methods for the
find and index methods.

--
Cheers.

Mark Lawrence

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Howto parse a string using a char in python David Robinow Python 0 02-15-2013 11:19 PM
Re: Howto parse a string using a char in python Tim Chase Python 0 02-15-2013 11:16 PM
Re: Howto parse a string using a char in python John Gordon Python 0 02-15-2013 11:11 PM
(const char *cp) and (char *p) are consistent type, (const char **cpp) and (char **pp) are not consistent lovecreatesbeauty C Programming 1 05-09-2006 08:01 AM
/usr/bin/ld: ../../dist/lib/libjsdombase_s.a(BlockGrouper.o)(.text+0x98): unresolvable relocation against symbol `std::basic_ostream<char, std::char_traits<char> >& std::endl<char, std::char_traits<char> >(std::basic_ostre silverburgh.meryl@gmail.com C++ 3 03-09-2006 12:14 AM



Advertisments