Changed regex for removing unit parameter from URL. It can be after # or &