Changes between Initial Version and Version 1 of Ticket #26621
- Timestamp:
- May 26, 2016, 1:39:43 PM (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #26621
- Property Component Uncategorized → contrib.admindocs
- Property Triage Stage Unreviewed → Accepted
- Property Summary simplify_regex having problems with named capture groups → simplify_regex handles named capture groups incorrectly
- Property Type Uncategorized → Bug
-
Ticket #26621 – Description
initial v1 1 For example using the regex from [here](http://www.django-rest-framework.org/api-guide/versioning/): 2 1 For example using a regex from [http://www.django-rest-framework.org/api-guide/versioning/ Django Rest Framework docs]: 3 2 4 3 {{{ 5 simplify_regex(r'^(?P<version>(v1|v2))/bookings/(?P<pk>[0-9]+)/$') 6 4 >>> from django.contrib.admindocs.views import simplify_regex 5 >>> simplify_regex(r'^(?P<version>(v1|v2))/bookings/(?P<pk>[0-9]+)/$') 7 6 '/<version>)/bookings/<pk>/' 8 7 }}} 9 8 9 The closing parenthesis in the output is unexpected. 10 10 11 Escaping the `/` does not seem to help.