String question
Bjorn Pettersen
bjorn at roguewave.com
Mon Sep 11 21:26:33 EDT 2000
theWord = text[start:start+len(seek)]
-b
Dennis Gurnick wrote:
>
> Does Python(1.6) have built-in string functions for trimming or extracting
> portion of strings?
>
> I would like to do the following
>
> (prototype)
> text = "here is some text"
> seek = "is"
> start = string.find( text, seek )
> theWord = text.grabxxxxx( start, len(seek ) )
>
> Regards,
>
> Dennis
>
> P.S. I've read the online docs, and I've seen that it is possible if you
> are taking a known value (i.e. theWord = text[100:]) ... simply stuck on
> semantics.
>
> --
> http://www.python.org/mailman/listinfo/python-list
More information about the Python-list
mailing list