In article <[EMAIL PROTECTED]>, lookon <[EMAIL PROTECTED]> wrote:
> I have a url of image, and I want to get the filename and extension of > the image. How to write in python? > > for example, the url is http://a.b.com/aaa.jpg?version=1.1 > > how can I get aaa and jpg by python? Despite the subject line, this is *not* a regex problem. The right tool is Python's built-in urlparse module, which understands the full syntax of urls. Trying to roll your own from scratch using split() or regex is the wrong solution. -- http://mail.python.org/mailman/listinfo/python-list