"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