2011/2/3 Łukasz Rekucki :
> On 3 February 2011 17:52, Tom Evans wrote:
>>
>> . matches any character, not just dot. Your class '[.\w]+' will
>> actually match anything and everything. I think you want '[\.\w]'.
>>
>
> Not if used in a character class:
> On Thu, Feb 3, 2011 at 4:50 PM, mike171562 wrote:
>> I think i got it now with
>>
>> (r'^zones/(?P[.\w]+)/$', get_domain)
Depending on what you plan to do with the matched string later, you
may want to limit it to 256 characters or incorporate some more
checks,
Here you go: http://www.regexbuddy.com/screen.html
On Thu, Feb 3, 2011 at 4:55 PM, Cal Leeming [Simplicity Media Ltd] <
cal.leem...@simplicitymedialtd.co.uk> wrote:
> Hi Mike,
>
> May I suggest RegexBuddy for anything regex related in the future, it have
> saved me a *lot* of time!
>
> Cal
>
>
>
Hi Mike,
May I suggest RegexBuddy for anything regex related in the future, it have
saved me a *lot* of time!
Cal
On Thu, Feb 3, 2011 at 4:44 PM, mike171562 wrote:
> I am building an app that passes a domain name to urls.py like so "/
> sites/domain.com/'
>
> but
On Thu, Feb 3, 2011 at 4:50 PM, mike171562 wrote:
> I think i got it now with
>
> (r'^zones/(?P[.\w]+)/$', get_domain)
>
>
. matches any character, not just dot. Your class '[.\w]+' will
actually match anything and everything. I think you want '[\.\w]'.
Cheers
Tom
> I am building an app that passes a domain name to urls.py like so "/
> sites/domain.com/'
>
> but I cannot get my urls.py to match the 'domain.com' it only seems
> to match if i just use domain without the dot
>
> I have tried
>
> (r'^zones/^[^/]+/', get_domain),
> (r'^zones/(?P\w+)/',
I think i got it now with
(r'^zones/(?P[.\w]+)/$', get_domain)
On Feb 3, 10:44 am, mike171562 wrote:
> I am building an app that passes a domain name to urls.py like so "/
> sites/domain.com/'
>
> but I cannot get my urls.py to match the 'domain.com' it only
I am building an app that passes a domain name to urls.py like so "/
sites/domain.com/'
but I cannot get my urls.py to match the 'domain.com' it only seems
to match if i just use domain without the dot
I have tried
(r'^zones/^[^/]+/', get_domain),
(r'^zones/(?P\w+)/', get_domain),
8 matches
Mail list logo