Regular expressions builder for automatically renumbering backreferences.