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