  
      An example URL conf for two views that accept two different versions.
  
      urlpatterns = [
          url(r'^(?P<version>[v1|v2]+)/users/$', users_list, name='users-list'),
          url(r'^(?P<version>[v1|v2]+)/users/(?P<pk>[0-9]+)/$', users_detail, name='users-detail')
      ]
  
      GET /1.0/something/ HTTP/1.1
      Host: example.com
      Accept: application/json
 
</s> remove         url(r'^/users/$', users_list, name='users-list'),
        url(r'^/users/(?P<pk>[0-9]+)/$', users_detail, name='users-detail')
 </s> add         path('/users/', users_list, name='users-list'),
        path('/users/<int:pk>/', users_detail, name='users-detail') </s> remove         url(r'^v1/', include('users.urls', namespace='v1')),
        url(r'^v2/', include('users.urls', namespace='v2'))
 </s> add         path('v1/', include('users.urls', namespace='v1')),
        path('v2/', include('users.urls', namespace='v2')) </s> remove             url(r'^', include(router.urls))
 </s> add             path('', include(router.urls)) </s> remove             url(r'^api/v1/example/?$', views.ExampleListView.as_view()),
            url(r'^api/v1/example/(?P<pk>\d+)/?$', views.ExampleDetailView.as_view()),
            url(r'^api/v1/example/(?P<pk>\d+)/sub/?$', views.ExampleDetailView.as_view()),
 </s> add             path('api/v1/example/', views.ExampleListView.as_view()),
            path('api/v1/example/<int:pk>/', views.ExampleDetailView.as_view()),
            path('api/v1/example/<int:pk>/sub/', views.ExampleDetailView.as_view()), </s> remove             url('^example/?$', views.ExampleListView.as_view()),
            url(r'^', include(router.urls))
 </s> add             path('example/', views.ExampleListView.as_view()),
            path('', include(router.urls))
        re_path(r'^(?P<version>[v1|v2]+)/users/$', users_list, name='users-list'),
        re_path(r'^(?P<version>[v1|v2]+)/users/(?P<pk>[0-9]+)/$', users_detail, name='users-detail')
  
      An example URL conf for two views that accept two different versions.
  
      urlpatterns = [
        re_path(r'^(?P<version>[v1|v2]+)/users/$', users_list, name='users-list'),
        re_path(r'^(?P<version>[v1|v2]+)/users/(?P<pk>[0-9]+)/$', users_detail, name='users-detail')
        re_path(r'^(?P<version>[v1|v2]+)/users/$', users_list, name='users-list'),
        re_path(r'^(?P<version>[v1|v2]+)/users/(?P<pk>[0-9]+)/$', users_detail, name='users-detail')
      ]
  
      GET /1.0/something/ HTTP/1.1
      Host: example.com
      Accept: application/json
keep keep keep keep replace replace keep keep keep keep keep
 Replace all url() calls with path() or re_path() (#7512)

* url() is deprecated in Django 3.1

* update given feedbacks on url() is deprecated in Django 3.1

* Fix test_urlpatterns.py to continue testing mixed re_path() and path()

* Fix one missed reference

Co-authored-by: sanjusci <sanju.sci9@gmail.com> 
rest_framework/versioning.py