URL structure look liks this: <domain>/<version>/<collection>/<sub-collection>/<page> where domain is anything a-zA-Z0-9\-\_, version is anything a-zA-Z0-9\-\_\. (But would likely be only 1.0, 1.1, 2.0.0 etc) and both collection and sub-collection are optional groups which follow <domain> restraints.
Current regex is: r'^(?P<domain_slug>[a-zA-Z0-9\-\_]*)\/(?P<version_slug>[a-zA-Z0-9\-\_\.]*)\/(?P<slug>[a-zA-Z0-9\-\_]+)\/$.
How can I capture optional positions, ensuring the last segment is always the page?
Additionally, is this even a good idea? Would it be better to just pass this through the Django URL conf and let a view function handle all the work?
Example URLs could include:
administration/5.0.3/reset-user-password
user/1.0/getting-started/setting-up-an-account
development/3.2/authentication/acl/creating-aco