diegueus9
diegueus9

Reputation: 31522

Regular expression for urlpattern

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 #

Upvotes: 4

Views: 307

Answers (2)

Ignacio Vazquez-Abrams
Ignacio Vazquez-Abrams

Reputation: 798456

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

Upvotes: 2

YOU
YOU

Reputation: 123791

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

Upvotes: 5

Related Questions