2👍
Your current RegEx will match:
- A string of one or more letters, numbers and/or underscores: [A-Za-z0-9_]+
OR
- A SINGLE character that is NOT a letter, number or underscore. [^A-Za-z0-9_]
You probably need something more like:
(?P<bu>[\w-]+)
This will match letters, numbers, underscore and hyphens. Add any other special characters you want as well (inside the square brackets). Remeber certain characters need escaping with \
before them.
- [Answered ]-Django + Heroku Database
- [Answered ]-Django Boolean Field returns False in template while it actually is True
- [Answered ]-Badly affecting performance in populating ManyToMany field values in rest api (using django rest framework)
- [Answered ]-Django uploading a file from a form fails to validate
- [Answered ]-How to refresh parts of a page in Django + jQuery?
Source:stackexchange.com