Re: a regular expression problem

2008-10-10 Thread Leefurong
> > I want to use django to dispatch url. > > The url is like /test/Google/6,and my patten is r'^/test/(?P\b\W+ \W should be \w, a typo? :) > > \b)/(?P\d+)$'. > > It works when the string is English(like Google), but fails when the > > string is in foreign language. Try this: r'(?u)^/test/(?P\b\w+\

Re: a regular expression problem

2008-10-10 Thread Bruno Desthuilliers
lookon a écrit : I want to use django to dispatch url. The url is like /test/Google/6,and my patten is r'^/test/(?P\b\W+ \b)/(?P\d+)$'. It works when the string is English(like Google), but fails when the string is in foreign language. Care to give an exemple of url that fails ? Anyway, if you

a regular expression problem

2008-10-10 Thread gita ziabari
> > > > > -- Forwarded message -- > From: lookon <[EMAIL PROTECTED]> > To: python-list@python.org > Date: Fri, 10 Oct 2008 03:58:08 -0700 (PDT) > Subject: a regular expression problem > I want to use django to dispatch url. > The url is like /

a regular expression problem

2008-10-10 Thread lookon
I want to use django to dispatch url. The url is like /test/Google/6,and my patten is r'^/test/(?P\b\W+ \b)/(?P\d+)$'. It works when the string is English(like Google), but fails when the string is in foreign language. Can anyone tell me the righ regular expression? Thank you! -- http://mail.pyth