How to find the first space?

Russell Blau russblau at hotmail.com
Mon Jun 9 11:33:43 EDT 2008


"Johny" <python at hope.cz> wrote in message 
news:7a91cc8f-2e93-46e9-8360-a01da9170187 at m44g2000hsc.googlegroups.com...
> How can I find the first space using regex?
>
> For example I have text
> Text=' This is a sample '

Why do you need to use a regex?

text = text.replace(" ", "")

Russ






More information about the Python-list mailing list