4

I need a regexp for a URL like:

/slug/#slug/slug/

I know it should be something like:

r'^(?P<slug1>[-\w]+)/#(?P<slug2>[-\w]+)/(?P<slug3>[-\w]+)/$'

But I am having problems with the character #

1
  • Have you tried escaping the #? \# Commented Jan 19, 2010 at 6:03

2 Answers 2

5

Parameter after # character is not send to server, so cannot catch in server side script like django.

Sign up to request clarification or add additional context in comments.

Comments

2

The URL fragment (everything after the #) is not sent to the server in a request.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.