Re: [Tutor] string fomatting

2009-02-01 Thread Kent Johnson
On Sat, Jan 31, 2009 at 1:44 PM, Jay Jesus Amorin wrote: > Thanks bob. > > I want to search any characters in test after https://www.localhost.org/ and > the search will end after it finds another / > > and when i print it will display testmodule. If *all* you want is the first element of the pat

Re: [Tutor] string fomatting

2009-01-31 Thread wesley chun
>> I want to search any characters in test after https://www.localhost.org/ >> and >> the search will end after it finds another / here's another solution that takes advantage of the 'maxsplit' parameter of the str.split() metho

Re: [Tutor] string fomatting

2009-01-31 Thread bob gailer
Jay Jesus Amorin wrote: Thanks bob. I want to search any characters in test after https://www.localhost.org/ and the search will end after it finds another / and when i print it will display *testmodule*. Ah. Much clear

Re: [Tutor] string fomatting

2009-01-31 Thread spir
Le Sun, 1 Feb 2009 02:44:02 +0800, Jay Jesus Amorin a écrit : > Thanks bob. > > I want to search any characters in test after > https://www.localhost.org/and > the search will end after it finds another / > > and when i print

Re: [Tutor] string fomatting

2009-01-31 Thread Kent Johnson
On Sat, Jan 31, 2009 at 1:44 PM, Jay Jesus Amorin wrote: > Thanks bob. > > I want to search any characters in test after https://www.localhost.org/ and > the search will end after it finds another / > > and when i print it will display testmodule. One way to do this would be to use urlparse.urlpa

Re: [Tutor] string fomatting

2009-01-31 Thread Jay Jesus Amorin
Thanks bob. I want to search any characters in test after https://www.localhost.org/and the search will end after it finds another / and when i print it will display *testmodule*. Newbie, Jay On Sun, Feb 1, 2009 at 2:29 AM,

Re: [Tutor] string fomatting

2009-01-31 Thread bob gailer
Jay Jesus Amorin wrote: Hi, I'm a newbie trying to learn python. Kindly help me on string formatting. test = https://www.localhost.org/testmodule/dev/trunk/admin/sql/mytest.sql what will i use to print this output? 1, https://www.localhost.org/ 2. testmodule 3. /dev/trunk/admin/sql/mytest.s

Re: [Tutor] string fomatting

2009-01-31 Thread bob gailer
Jay Jesus Amorin wrote: Hi, I'm a newbie trying to learn python. Kindly help me on string formatting. test = https://www.localhost.org/testmodule/dev/trunk/admin/sql/mytest.sql My browser can't establish a connection to that site! what will i use to print this output? 1, https://www.localh

[Tutor] string fomatting

2009-01-31 Thread Jay Jesus Amorin
Hi, I'm a newbie trying to learn python. Kindly help me on string formatting. test = https://www.localhost.org/testmodule/dev/trunk/admin/sql/mytest.sql what will i use to print this output? 1, https://www.localhost.org/ 2. testmodule 3. /dev/trunk/admin/sql/mytest.sql Thanks, Jay __