Condensed two tests into one to comply with the naming convention for testing backreferences.
Added support for g numbered backreferences like \g1.. \g99, and \g{1}.. \g{99}. (Part of #4.)