Try adding a capital P after the ? in your named capture group.

Otherwise your capture group does not place its value in the your_email
variable as you are expecting:

(?P<your_email>...


Check out the Python re module syntax for an explanation:

https://docs.python.org/2/library/re.html

-James

On Thursday, October 9, 2014, dk <[email protected]> wrote:

> I put the Email that I got from a form into the url (I am using the url as
> a variable to store the email)
>
> and look like this
> http://127.0.0.1:8000/polls/vote/thank/[email protected]/
>
>
> url:
> url(r'^vote/thank/(?<your_email>   #here should be RE catching the email
>    )$', views.thank),
> view:
> def thank(request, your_email=None):
>     c = {"thanks_body": "thanks_body view"}
>     c["his_email"] = your_email
>     return render(request, "thanks.html", c)
>
> I am having issues to try to come up with a RE to grab the email
> I try
> http://stackoverflow.com/questions/201323/using-a-regular-expression-to-validate-an-email-address
> using it on my url
> such
> url(r'^vote/thank/(?<your_email>
> *^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$* ',
> views.thank),
>  and I still don't catch it, I think because I am just copy pasting but in
> the url string should be arrenge diferntly?
> I was reading about a  get function that can make a quary on the url like
> a dictionary?  any example on how to use it?
>
> thanks,  (I order a book for RE  =)  just to be able to udertand a little
> bit more   )
>
>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected]
> <javascript:_e(%7B%7D,'cvml','django-users%[email protected]');>
> .
> To post to this group, send email to [email protected]
> <javascript:_e(%7B%7D,'cvml','[email protected]');>.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/b84874c3-32ad-47fb-82db-5e48b87a975d%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/b84874c3-32ad-47fb-82db-5e48b87a975d%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CA%2Be%2BciUX_d%2BEay9%3DrjqcmpyHvm32eqBNH-eO%2B4WmX5by9oDX4Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to