On Tue, Nov 06, 2007 at 08:49:33AM -0800, [EMAIL PROTECTED] wrote regarding regular expressions: > > hi i am looking for pattern in regular expreesion that replaces > anything starting with and betweeen http:// until / > like http://www.start.com/startservice/yellow/ fdhttp://helo/abcd will > be replaced as > p/startservice/yellow/ fdp/abcd >
You don't need regular expressions to do that. Look into the methods that strings have. Look at slicing. Look at len. Keep your code readable for future generations. Py>>> help(str) Py>>> dir(str) Py>>> help(str.startswith) Cheers, Cliff -- http://mail.python.org/mailman/listinfo/python-list