#27102 closed Bug (duplicate)
simplify_regex is not cleaning up any outstanding regex-y character
Reported by: | Prajjwol Gautam | Owned by: | Prajjwol Gautam |
---|---|---|---|
Component: | contrib.admindocs | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
If you try cleaning up a regex pattern involving groups, simplify_regex fails to remove a bracket.
Steps to reproduce:
run this in your shell:
django.contrib.admindocs.views.simplify_regex('^orgs/(?P<org_id>([0-9a-f]{32}|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}))$')
output:
'/orgs/<org_id>)'
expected output:
'/orgs/<org_id>'
Change History (5)
comment:1 by , 8 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:2 by , 8 years ago
Needs tests: | set |
---|---|
Triage Stage: | Unreviewed → Accepted |
Version: | 1.8 → master |
comment:3 by , 8 years ago
Needs tests: | unset |
---|
The test in the pull request is fixed by the PR for #26621 so this ticket might be considered a duplicate.
comment:4 by , 8 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:5 by , 8 years ago
Resolution: | fixed → duplicate |
---|
Note:
See TracTickets
for help on using tickets.
PR