Re: simple url regexp

2008-05-23 Thread Stefan Behnel
[EMAIL PROTECTED] wrote: > url = re.compile(r"((http|ftp|https)\:\/\/)(www)?([a-zA-Z]{1}([\w\-]+ > \.)+([\w]{2,5}))(:[\d]{1,5})?((/?\w+/)+|/?)(\w+ > \.[\w]{3,4})?((\?\w+=\w+)?(&\w+=\w+)*)?") > > damn i hate these things. > > i want it to only match http://www.name.any/etc > > not http://wiki.x e

simple url regexp

2008-05-23 Thread notnorwegian
url = re.compile(r"((http|ftp|https)\:\/\/)(www)?([a-zA-Z]{1}([\w\-]+ \.)+([\w]{2,5}))(:[\d]{1,5})?((/?\w+/)+|/?)(\w+ \.[\w]{3,4})?((\?\w+=\w+)?(&\w+=\w+)*)?") damn i hate these things. i want it to only match http://www.name.any/etc not http://wiki.x etc -- http://mail.python.org/mailman/listi